From 3f1683f8b9c5041aa65b32cfeadd466017e285af Mon Sep 17 00:00:00 2001 From: shubham yadav <126192924+yadavshubham01@users.noreply.github.com> Date: Sun, 24 Nov 2024 23:25:14 +0530 Subject: [PATCH] Update 1-click install script to use /tags endpoint instead of /release (#8689) Updated the API endpoint from https://api.github.com/repos/twentyhq/twenty/releases/latest to https://api.github.com/repos/twentyhq/twenty/tags. Related Issue #8679 --- packages/twenty-docker/scripts/1-click.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/twenty-docker/scripts/1-click.sh b/packages/twenty-docker/scripts/1-click.sh index 24910f11b..7e9c535f4 100644 --- a/packages/twenty-docker/scripts/1-click.sh +++ b/packages/twenty-docker/scripts/1-click.sh @@ -1,4 +1,9 @@ -pull_version=${VERSION:-$(curl -s https://api.github.com/repos/twentyhq/twenty/releases/latest | grep '"tag_name":' | cut -d '"' -f 4)} +pull_version=${VERSION:-$(curl -s https://api.github.com/repos/twentyhq/twenty/tags | grep '"name":' | head -n 1 | cut -d '"' -f 4)} + +if [[ -z "$pull_version" ]]; then + echo "Error: Unable to fetch the latest version tag. Please check your network connection or the GitHub API response." + exit 1 +fi pull_branch=${BRANCH:-$pull_version} version_num=${pull_version#v}