]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
SCRIPTS: make publish-release try to launch make-releases-json
authorWilly Tarreau <w@1wt.eu>
Mon, 30 May 2022 13:34:51 +0000 (15:34 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 30 May 2022 13:44:10 +0000 (15:44 +0200)
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

index 4938049a3ed3641c1751038b46bbd05deb71490c..3cf32d80c5772eb36300e04aa6586904dde0edf7 100755 (executable)
@@ -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)