diff --git a/makezip.sh b/makezip.sh index 764b71d..a31d161 100755 --- a/makezip.sh +++ b/makezip.sh @@ -1,15 +1,20 @@ #!/bin/sh -NAME=$1 -VERSION=$2 -ZIP=${NAME}_${VERSION} - -cd prometheus -git archive --format=zip --prefix=$ZIP/prometheus/ -o ../prometheus-client.zip HEAD -cd ../$NAME -git archive --format=zip --prefix=$ZIP/ -o ../$ZIP.zip HEAD . -cd .. -unzip prometheus-client.zip -rm prometheus-client.zip -zip -m -g -r $ZIP.zip $ZIP/prometheus -rmdir $ZIP +# jq comes from https://stedolan.github.io/jq/download (or apt install it). +NAMES='promfacto '`git config --file .gitmodules --get-regexp path | awk '$2 != "prometheus" { print $2 }'` + +for NAME in $NAMES; do + cd $NAME + VERSION=`jq -r '.version' info.json` + ZIP=${NAME}_${VERSION} + + git archive --format=zip --prefix=$ZIP/ -o ../$ZIP.zip HEAD . + cd ../prometheus + git archive --format=zip --prefix=$ZIP/prometheus/ -o ../prometheus-client.zip HEAD + + cd .. + unzip prometheus-client.zip + rm prometheus-client.zip + zip -m -g -r $ZIP.zip $ZIP/prometheus + rmdir $ZIP +done diff --git a/promfacto/info.json b/promfacto/info.json index 6ad0665..46eb2f8 100644 --- a/promfacto/info.json +++ b/promfacto/info.json @@ -1,6 +1,6 @@ { "name": "promfacto", - "version": "0.1.2", + "version": "0.1.4", "title": "Promfacto", "author": "ncabatoff", "description": "Publish metrics to a Prometheus.io server",