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

Commit 7d031982 authored by Jackeagle's avatar Jackeagle
Browse files

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

parent e78510db
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -168,7 +168,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 | 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'"