From 804f3bef24a9cfbc07843dab32b59336292df214 Mon Sep 17 00:00:00 2001 From: crystal Date: Sun, 28 Apr 2024 23:32:13 -0600 Subject: [PATCH] [squash] POSIX logic for tag detection This never actually got executed in tests but the old logic only works in bash. Follow-up to #27 --- .ci-make.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci-make.sh b/.ci-make.sh index 8356dbc..5e471ab 100755 --- a/.ci-make.sh +++ b/.ci-make.sh @@ -97,13 +97,13 @@ case "$1" in git describe --tags HEAD CI_COMMIT_TAG_RESOLVE=$(git describe --tags HEAD --abbrev=0) echo "Closest existing tag: $CI_COMMIT_TAG_RESOLVE" - if [ "$CI_COMMIT_TAG_RESOLVE" = *"-dev" ] ; then + if [ "$CI_COMMIT_TAG_RESOLVE" != "${CI_COMMIT_TAG_RESOLVE%"-dev"}" ] || [ ! "$CI_COMMIT_TAG_RESOLVE" ] ; then if [ $PR_MODE ] ; then echo "I can't figure out which release version of Forgejo to build your PR against." echo "Whatever you're trying to do is not yet implemented." exit 97 fi - echo "err! building dev version- skipping binary dl" + echo "err! unable to resolve tag or building dev version- skipping binary dl" CI_COMMIT_TAG_RESOLVE= fi fi