Skip to content

Commit

Permalink
Merge pull request #101 from rexagod/fix-missing-upstream-version-fil…
Browse files Browse the repository at this point in the history
…e-case

address the missing upstream VERSION case
  • Loading branch information
simonpasquier authored Nov 13, 2024
2 parents 6176eba + 6a3abb9 commit 7b9015f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/merge-flow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,11 @@ jobs:
run: git merge --continue
- name: Add VERSION file if not present
run: |
is_version_file_present_upstream=$(git ls-tree ${{ steps.upstream.outputs.release }} | grep VERSION || true)
# All tags use the vX.Y.Z format currently.
version_from_tag=$(echo ${{ steps.upstream.outputs.release }} | sed -e "s/^v//")
if [ -f VERSION ]; then
# Perform check only if both remotes have the VERSION file.
if [ -n "$is_version_file_present_upstream" ] && [ -f VERSION ]; then
version_from_file=$(cat VERSION)
if [ "$version_from_tag" != "$version_from_file" ];then
echo "::error:: tag version ${version_from_tag} doesn't correspond to version ${version_from_file} from VERSION file"
Expand Down

0 comments on commit 7b9015f

Please sign in to comment.