1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

check hub API access in upgrade script

This commit is contained in:
Sylvain 2021-10-04 16:45:54 +02:00
parent dceabe4ee2
commit f2c436594a
2 changed files with 7 additions and 0 deletions

View File

@ -1,6 +1,8 @@
# Changelog Fab-manager
- The upgrade script will check and report the ability to access the hub API
- Fix a bug: the upgrade script report an invalid version to upgrade to
- Fix a security issue: updated tar to 6.1.11 to fix [CVE-2021-37712](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-37712), [CVE-2021-37701](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-37701) and [CVE-2021-37713](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-37713)
## v5.1.10 2021 October 04

View File

@ -89,6 +89,11 @@ target_version()
if [[ "$TAG" =~ ^:release-v[\.0-9]+$ ]]; then
TARGET=$(echo "$TAG" | grep -Eo '[\.0-9]{5}')
elif [ "$TAG" = ":latest" ] || [ "$TAG" = "" ]; then
HTTP_CODE=$(curl -I -s -w "%{http_code}\n" -o /dev/null https://hub.fab-manager.com/api/versions/latest)
if [ "$HTTP_CODE" != 200 ]; then
printf "\n\n\e[91m[ ❌ ] Unable to retrieve the last version of Fab-manager. Please check your internet connection or restart this script providing the \e[1m-t\e[0m\e[91m option\n\e[39m"
exit 3
fi
TARGET=$(\curl -sSL "https://hub.fab-manager.com/api/versions/latest" | jq -r '.semver')
else
TARGET='custom'