2024-11-24 20:55:14 +03:00
|
|
|
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
|
2024-11-21 13:51:42 +03:00
|
|
|
pull_branch=${BRANCH:-$pull_version}
|
|
|
|
|
|
|
|
version_num=${pull_version#v}
|
|
|
|
target_version="0.32.4"
|
|
|
|
|
|
|
|
# We moved the install script to a different location in v0.32.4
|
|
|
|
if [[ -n "$BRANCH" ]] || [[ "$(printf '%s\n' "$target_version" "$version_num" | sort -V | head -n1)" != "$version_num" ]]; then
|
2024-11-22 12:29:36 +03:00
|
|
|
curl -sL "https://raw.githubusercontent.com/twentyhq/twenty/$pull_branch/packages/twenty-docker/scripts/install.sh" -o twenty_install.sh
|
2024-11-21 13:51:42 +03:00
|
|
|
else
|
2024-11-22 12:29:36 +03:00
|
|
|
curl -sL "https://raw.githubusercontent.com/twentyhq/twenty/$pull_branch/install.sh" -o twenty_install.sh
|
2024-11-21 13:51:42 +03:00
|
|
|
fi
|
2024-11-22 12:29:36 +03:00
|
|
|
|
|
|
|
chmod +x twenty_install.sh
|
|
|
|
VERSION="$VERSION" BRANCH="$BRANCH" ./twenty_install.sh
|
|
|
|
|
|
|
|
rm twenty_install.sh
|