From 8e9f915f8f8fff2685da28e6c06e1285a1c6293a Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 30 May 2022 15:34:51 +0200 Subject: [PATCH] SCRIPTS: make publish-release try to launch make-releases-json Now when publishing a release, if make-releases-json is usable at the same place, it will be called to regenerate the json index of available versions. --- scripts/publish-release | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/publish-release b/scripts/publish-release index 4938049a3..3cf32d80c 100755 --- a/scripts/publish-release +++ b/scripts/publish-release @@ -17,6 +17,7 @@ BRANCH= DEVEL= QUIET= AUTO= +ARG0="$0" NEW= DIR= DOC=( ) @@ -178,6 +179,11 @@ for i in "${DOC[@]}"; do $CMD_GZIP < "$TARGET_DIR/doc/${i#doc/}" > "$TARGET_DIR/doc/${i#doc/}.gz" done +if [ -x "${ARG0%/*}/make-releases-json" ]; then + # regenerate versions + "${ARG0%/*}/make-releases-json" -o "$TARGET_DIR/src/releases.json" "$TARGET_DIR" +fi + echo "Done : ls -l ${TARGET_DIR}" ( cd "$TARGET_DIR" ; ls -l src/CHANGELOG "src${DEVEL}/haproxy-${NEW}".tar.gz{,.md5,.sha256} $(for i in "${DOC[@]}"; do echo "doc/${i#doc/}"{,.gz}; done)