ci: version updater fix syntax

Signed-off-by: anviar <oleg.kluchkin+github@gmail.com>
This commit is contained in:
anviar 2024-02-27 11:52:03 +03:00
parent 45595a7d65
commit 20a86dd76b
No known key found for this signature in database
GPG key ID: 1D9496B16B0FC606

View file

@ -68,10 +68,11 @@ if [[ -z "${role}" ]]; then
fi
# Get latest version.
if [[ ${type} == "github" ]]
if [[ "${type}" == "github" ]]
then
version="$(github_api "repos/${source_repo}/releases/latest" | jq '.tag_name' | tr -d '"v')"
elif [[ ${type} == "gitlab" ]]
elif [[ "${type}" == "gitlab" ]]
then
version="$(curl https://gitlab.com/api/v4/projects/${source_repo}/releases|jq '.[0].tag_name'| tr -d '"v')"
else
echo_red 'Unknown source type. Terminating.'