Skip to content

Commit 107d123

Browse files
author
Sophia Marie Terry
committed
Try different approach for version fetch
1 parent ac8b79f commit 107d123

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/ipa-changelog.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ jobs:
2525
current_version=$(jq '.version' package.json)
2626
echo "Current version: $current_version"
2727
28-
git fetch --tags
29-
previous_version=$(git tag --sort=-v:refname | head -n 1 || echo "none")
28+
git fetch origin ${{ github.event.pull_request.base.ref }}
29+
git checkout ${{ github.event.pull_request.base.ref }}
30+
previous_version=$(jq -r '.version' package.json)
31+
32+
if [[ -z "$previous_version" || "$previous_version" == "null" ]]; then
33+
previous_version="none"
34+
fi
3035
echo "Previous version: $previous_version"
3136

3237
version_bump=$([[ "$previous_version" != "v$current_version" ]] && echo "true" || echo "false")

0 commit comments

Comments
 (0)