diff options
| author | crystal <crystal@noreply.codeberg.org> | 2024-05-01 19:57:10 -0600 | 
|---|---|---|
| committer | crystal <crystal@noreply.codeberg.org> | 2024-05-01 19:57:10 -0600 | 
| commit | 2cbc8603ba9dbe47df6ffb9bde07e1abcea58aef (patch) | |
| tree | 9e976489e51f8625ddbc4e89873175a0b7fc3538 | |
| parent | f985489b7058cc2d0b57ba861d1b81546f803993 (diff) | |
Support downloading binaries for experimental releases
This is a minor enhancement that allows the forgejo-bin package to match
the others, specifically when building a pull request for an official
Forgejo version that hasn't yet been released.
| -rwxr-xr-x | .ci-make.sh | 13 | 
1 files changed, 12 insertions, 1 deletions
diff --git a/.ci-make.sh b/.ci-make.sh index 8755a80..5e537e4 100755 --- a/.ci-make.sh +++ b/.ci-make.sh @@ -95,7 +95,18 @@ case "$1" in  			if [ ! $CI_COMMIT_TAG_RESOLVE ] ; then  				echo "Failed to resolve exact tag! Getting as close as we can..."  				git describe --tags HEAD -				CI_COMMIT_TAG_RESOLVE=$(git describe --tags HEAD --abbrev=0) +				FORGEJO_CLOSEST_TAG=$(git describe --tags HEAD --abbrev=0) +				echo "Looking for experimental tag..." +				EXPERIMENTAL_REPO="forgejo-experimental/forgejo" +				git remote add experimental $CI_VERIFY_API/$EXPERIMENTAL_REPO +				git fetch experimental --tags +				CI_COMMIT_TAG_RESOLVE=$(git tag --points-at HEAD) +				if [ $CI_COMMIT_TAG_RESOLVE ] ; then +					CI_VERIFY_REPO=$EXPERIMENTAL_REPO +					FORGEJO_CLOSEST_TAG=$CI_COMMIT_TAG_RESOLVE +					echo "Found it! Using experimental tag and downloading binary from $CI_VERIFY_REPO" +				fi +				CI_COMMIT_TAG_RESOLVE=$FORGEJO_CLOSEST_TAG  				echo "Closest existing tag: $CI_COMMIT_TAG_RESOLVE"  				if [ "$CI_COMMIT_TAG_RESOLVE" != "${CI_COMMIT_TAG_RESOLVE%"-dev"}" ] || [ ! "$CI_COMMIT_TAG_RESOLVE" ] ; then  					if [ $PR_MODE ] ; then  | 
