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.
diff --git a/scripts/publish-release b/scripts/publish-release
index 4938049..3cf32d8 100755
--- a/scripts/publish-release
+++ b/scripts/publish-release
@@ -17,6 +17,7 @@
DEVEL=
QUIET=
AUTO=
+ARG0="$0"
NEW=
DIR=
DOC=( )
@@ -178,6 +179,11 @@
$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)