From 37bc7e9e0ff71590467146147b2177c012736101 Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Thu, 12 Mar 2020 00:53:13 +0100 Subject: [PATCH] Make generate-stackbrew-library.sh reproducible Signed-off-by: Tilo Spannagel --- generate-stackbrew-library.sh | 6 +----- update.sh | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index a68081c9..873d3bff 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -67,11 +67,7 @@ join() { echo "${out#$sep}" } -latest=$( curl -fsSL 'https://download.nextcloud.com/server/releases/' |tac|tac| \ - grep -oE 'nextcloud-[[:digit:]]+(\.[[:digit:]]+){2}' | \ - grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}' | \ - sort -uV | \ - tail -1 ) +latest=$( cat latest.txt ) # Generate each of the tags. versions=( */ ) diff --git a/update.sh b/update.sh index 890b54f1..2c435c6b 100755 --- a/update.sh +++ b/update.sh @@ -157,6 +157,12 @@ function create_variant() { done } +curl -fsSL 'https://download.nextcloud.com/server/releases/' |tac|tac| \ + grep -oE 'nextcloud-[[:digit:]]+(\.[[:digit:]]+){2}' | \ + grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}' | \ + sort -uV | \ + tail -1 > latest.txt + find . -maxdepth 1 -type d -regextype sed -regex '\./[[:digit:]]\+\.[[:digit:]]\+\(-rc\|-beta\|-alpha\)\?' -exec rm -r '{}' \; fullversions=( $( curl -fsSL 'https://download.nextcloud.com/server/releases/' |tac|tac| \