From: Evert Timberg Date: Thu, 5 Mar 2020 23:05:02 +0000 (-0500) Subject: Make update_latest work with alpha, beta, etc. (#7177) X-Git-Tag: v3.0.0-alpha~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6836e514bf2619ee926b0b85996324f8851bc6c2;p=thirdparty%2FChart.js.git Make update_latest work with alpha, beta, etc. (#7177) Make update_latest work with alpha, beta, etc. --- diff --git a/scripts/deploy.sh b/scripts/deploy.sh index f3212b4fc..7c49968d1 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -20,10 +20,22 @@ fi function update_latest { local out_path=$1 + + # The most recent directory whose name is a version number local latest=($(ls -v $out_path | egrep '^('$VERSION_REGEX')$' | tail -1)) + + # As soon as a single version is deployed this line is a no-op if [ "$latest" == "" ]; then latest='master'; fi - rm -f $out_path/latest - ln -s $latest $out_path/latest + + # Don't update "latest" on alpha or beta releases + if [[ "$latest" =~ ^[^-]+$ ]]; then + rm -f $out_path/latest + ln -s $latest $out_path/latest + fi + + # Always update "next" + rm -f $out_path/next + ln -s $latest $out_path/next } function deploy_files {