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}