From f6ce19c17d6af4d1137cb9c26670d127ebb102fa Mon Sep 17 00:00:00 2001 From: Romain Hunault Date: Tue, 23 Jun 2020 15:54:40 +0000 Subject: [PATCH] Support e/os/releases tags on community docker image --- build-community.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build-community.sh b/build-community.sh index ccea288..efa019e 100755 --- a/build-community.sh +++ b/build-community.sh @@ -99,7 +99,15 @@ for branch in ${BRANCH_NAME//,/ }; do if [ "$LOCAL_MIRROR" = true ]; then yes | repo init -u "$REPO" --reference "$MIRROR_DIR" -b "$branch" &>> "$repo_log" else - yes | repo init -u "$REPO" -b "$branch" &>> "$repo_log" + TAG_PREFIX="" + curl https://gitlab.e.foundation/api/v4/projects/659/repository/tags | grep "\"name\":\"$branch\"" + if [ $? == 0 ] + then + echo "Branch name $branch is a tag on e/os/releases, prefix with refs/tags/ for 'repo init'" + TAG_PREFIX="refs/tags/" + fi + + yes | repo init -u "$REPO" -b "${TAG_PREFIX}$branch" &>> "$repo_log" fi # Copy local manifests to the appropriate folder in order take them into consideration -- GitLab