Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a3ec4df authored by Jackeagle's avatar Jackeagle
Browse files

build.sh: Use GitLab API search param for tag lookup

parent fd5ae351
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then
  TAG_PREFIX=""

  # Fetch all tags and check for an exact match
  TAG_MATCH=$(curl -s --fail https://gitlab.e.foundation/api/v4/projects/659/repository/tags?per_page=100 | jq -r ".[].name" | grep -Fx "$BRANCH_NAME")
  TAG_MATCH=$(curl -s --fail "https://gitlab.e.foundation/api/v4/projects/659/repository/tags?search=${BRANCH_NAME}" | jq -r ".[].name")

  if [ -n "$TAG_MATCH" ]; then
    echo ">> [$(date)] Branch name $BRANCH_NAME is a tag on e/os/releases, prefixing with refs/tags/ for 'repo init'"