Skip to content

Commit 7b9015f

Browse files
Merge pull request #101 from rexagod/fix-missing-upstream-version-file-case
address the missing upstream VERSION case
2 parents 6176eba + 6a3abb9 commit 7b9015f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/merge-flow.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,11 @@ jobs:
161161
run: git merge --continue
162162
- name: Add VERSION file if not present
163163
run: |
164+
is_version_file_present_upstream=$(git ls-tree ${{ steps.upstream.outputs.release }} | grep VERSION || true)
164165
# All tags use the vX.Y.Z format currently.
165166
version_from_tag=$(echo ${{ steps.upstream.outputs.release }} | sed -e "s/^v//")
166-
if [ -f VERSION ]; then
167+
# Perform check only if both remotes have the VERSION file.
168+
if [ -n "$is_version_file_present_upstream" ] && [ -f VERSION ]; then
167169
version_from_file=$(cat VERSION)
168170
if [ "$version_from_tag" != "$version_from_file" ];then
169171
echo "::error:: tag version ${version_from_tag} doesn't correspond to version ${version_from_file} from VERSION file"

0 commit comments

Comments
 (0)