@@ -57,7 +57,7 @@ function spinner() {
57
57
58
58
function checkLatestRelease(){
59
59
echo " Checking for the latest release..." >&2
60
- local latest_release=$( curl -s https://api.github.com/repos/$GH_REPO /releases/latest | grep -o ' "tag_name": "[^"]*"' | sed ' s/"tag_name": "//;s/"//g' )
60
+ local latest_release=$( curl -sSL https://api.github.com/repos/$GH_REPO /releases/latest | grep -o ' "tag_name": "[^"]*"' | sed ' s/"tag_name": "//;s/"//g' )
61
61
if [ -z " $latest_release " ]; then
62
62
echo " Failed to check for the latest release. Exiting..." >&2
63
63
exit 1
@@ -247,15 +247,15 @@ function download() {
247
247
mv $PLANE_INSTALL_DIR /docker-compose.yaml $PLANE_INSTALL_DIR /archive/$TS .docker-compose.yaml
248
248
fi
249
249
250
- RESPONSE=$( curl -H ' Cache-Control: no-cache, no-store' -s -w " HTTPSTATUS:%{http_code}" " $RELEASE_DOWNLOAD_URL /$APP_RELEASE /docker-compose.yml?$( date +%s) " )
250
+ RESPONSE=$( curl -sSL - H ' Cache-Control: no-cache, no-store' -w " HTTPSTATUS:%{http_code}" " $RELEASE_DOWNLOAD_URL /$APP_RELEASE /docker-compose.yml?$( date +%s) " )
251
251
BODY=$( echo " $RESPONSE " | sed -e ' s/HTTPSTATUS\:.*//g' )
252
252
STATUS=$( echo " $RESPONSE " | tr -d ' \n' | sed -e ' s/.*HTTPSTATUS://' )
253
253
254
254
if [ " $STATUS " -eq 200 ]; then
255
255
echo " $BODY " > $PLANE_INSTALL_DIR /docker-compose.yaml
256
256
else
257
257
# Fallback to download from the raw github url
258
- RESPONSE=$( curl -H ' Cache-Control: no-cache, no-store' -s -w " HTTPSTATUS:%{http_code}" " $FALLBACK_DOWNLOAD_URL /docker-compose.yml?$( date +%s) " )
258
+ RESPONSE=$( curl -sSL - H ' Cache-Control: no-cache, no-store' -w " HTTPSTATUS:%{http_code}" " $FALLBACK_DOWNLOAD_URL /docker-compose.yml?$( date +%s) " )
259
259
BODY=$( echo " $RESPONSE " | sed -e ' s/HTTPSTATUS\:.*//g' )
260
260
STATUS=$( echo " $RESPONSE " | tr -d ' \n' | sed -e ' s/.*HTTPSTATUS://' )
261
261
@@ -269,15 +269,15 @@ function download() {
269
269
fi
270
270
fi
271
271
272
- RESPONSE=$( curl -H ' Cache-Control: no-cache, no-store' -s -w " HTTPSTATUS:%{http_code}" " $RELEASE_DOWNLOAD_URL /$APP_RELEASE /variables.env?$( date +%s) " )
272
+ RESPONSE=$( curl -sSL - H ' Cache-Control: no-cache, no-store' -w " HTTPSTATUS:%{http_code}" " $RELEASE_DOWNLOAD_URL /$APP_RELEASE /variables.env?$( date +%s) " )
273
273
BODY=$( echo " $RESPONSE " | sed -e ' s/HTTPSTATUS\:.*//g' )
274
274
STATUS=$( echo " $RESPONSE " | tr -d ' \n' | sed -e ' s/.*HTTPSTATUS://' )
275
275
276
276
if [ " $STATUS " -eq 200 ]; then
277
277
echo " $BODY " > $PLANE_INSTALL_DIR /variables-upgrade.env
278
278
else
279
279
# Fallback to download from the raw github url
280
- RESPONSE=$( curl -H ' Cache-Control: no-cache, no-store' -s -w " HTTPSTATUS:%{http_code}" " $FALLBACK_DOWNLOAD_URL /variables.env?$( date +%s) " )
280
+ RESPONSE=$( curl -sSL - H ' Cache-Control: no-cache, no-store' -w " HTTPSTATUS:%{http_code}" " $FALLBACK_DOWNLOAD_URL /variables.env?$( date +%s) " )
281
281
BODY=$( echo " $RESPONSE " | sed -e ' s/HTTPSTATUS\:.*//g' )
282
282
STATUS=$( echo " $RESPONSE " | tr -d ' \n' | sed -e ' s/.*HTTPSTATUS://' )
283
283
0 commit comments