Skip to content

Commit

Permalink
make makezip build them all and extract version from info.json; bump …
Browse files Browse the repository at this point in the history
…release to 0.1.4 because I messed up 0.1.3
  • Loading branch information
ncabatoff committed Aug 7, 2016
1 parent 8324815 commit 04baf6c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
31 changes: 18 additions & 13 deletions makezip.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion promfacto/info.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 04baf6c

Please sign in to comment.