From c1dc6da8d12c7775d33832b2017056faca8e65fd Mon Sep 17 00:00:00 2001 From: Nick Molcanov <32801560+nck-mlcnv@users.noreply.github.com> Date: Wed, 27 Nov 2024 22:20:49 +0100 Subject: [PATCH] Fix version check workflow again (#302) --- .github/scripts/check_schema_version.sh | 4 +++- .github/scripts/tagcheck.sh | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/scripts/check_schema_version.sh b/.github/scripts/check_schema_version.sh index 819aea80e..9d450cca3 100755 --- a/.github/scripts/check_schema_version.sh +++ b/.github/scripts/check_schema_version.sh @@ -3,8 +3,10 @@ PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) ONTOLOGY_VERSION=$(mvn help:evaluate -Dexpression=ontology.version -q -DforceStdout) +git fetch --all > /dev/null 2>&1 + # Check for changes and compare versions -if git diff --quiet "main:$(git ls-tree -r --name-only main | grep 'iguana.owx')" 'src/main/resources/iguana.owx'; then +if git diff --quiet "origin/main:$(git ls-tree -r --name-only origin/main | grep 'iguana.owx')" 'src/main/resources/iguana.owx'; then DIFF_STATUS=0 else DIFF_STATUS=1 diff --git a/.github/scripts/tagcheck.sh b/.github/scripts/tagcheck.sh index 260f70bfa..196445e5a 100755 --- a/.github/scripts/tagcheck.sh +++ b/.github/scripts/tagcheck.sh @@ -1,5 +1,7 @@ #!/bin/sh +git fetch --all > /dev/null 2>&1 + if git rev-parse "$1" >/dev/null 2>&1; then echo "Tag $1 exist - update version in pom!" exit 1