From 6d9d0e4dfd9206c4bcf36b0633f34f325fa6d209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20St=C3=A4ber?= Date: Sun, 8 May 2016 20:59:52 +0200 Subject: [PATCH] fix version and add version to release file name --- release.sh | 38 +++++++++++++++++++------------------- version.go | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/release.sh b/release.sh index 05e93184..6d775c75 100755 --- a/release.sh +++ b/release.sh @@ -7,7 +7,7 @@ set -e # The Darwin release is built natively, Linux and Windows are built in a Docker container #======================================================================================== -export VERSION=v0.0.1 +export VERSION=0.0.1 cd $GOPATH/src/github.com/fstab/grok_exporter rm -rf dist @@ -40,16 +40,16 @@ go test ./... function make_release { ARCH=$1 EXTENSION=$2 - echo "Building grok_exporter.$ARCH" - mkdir -p dist/grok_exporter.$ARCH - docker run -v $GOPATH:/root/go -t -i fstab/grok_exporter-compiler compile-$ARCH.sh -o dist/grok_exporter.$ARCH/grok_exporter$EXTENSION - cp -a logstash-patterns-core/patterns dist/grok_exporter.$ARCH - cp -a example dist/grok_exporter.$ARCH + echo "Building grok_exporter-$VERSION.$ARCH" + mkdir -p dist/grok_exporter-$VERSION.$ARCH + docker run -v $GOPATH:/root/go -t -i fstab/grok_exporter-compiler compile-$ARCH.sh -o dist/grok_exporter-$VERSION.$ARCH/grok_exporter$EXTENSION + cp -a logstash-patterns-core/patterns dist/grok_exporter-$VERSION.$ARCH + cp -a example dist/grok_exporter-$VERSION.$ARCH cd dist - sed -i.bak s,/logstash-patterns-core/patterns,/patterns,g grok_exporter.$ARCH/example/*.yml - rm grok_exporter.$ARCH/example/*.yml.bak - zip --quiet -r grok_exporter.$ARCH.zip grok_exporter.$ARCH - rm -r grok_exporter.$ARCH + sed -i.bak s,/logstash-patterns-core/patterns,/patterns,g grok_exporter-$VERSION.$ARCH/example/*.yml + rm grok_exporter-$VERSION.$ARCH/example/*.yml.bak + zip --quiet -r grok_exporter-$VERSION.$ARCH.zip grok_exporter-$VERSION.$ARCH + rm -r grok_exporter-$VERSION.$ARCH cd .. } @@ -62,14 +62,14 @@ make_release linux-amd64 ARCH=darwin-amd64 -echo "Building grok_exporter.$ARCH" -mkdir -p dist/grok_exporter.$ARCH -go build -o dist/grok_exporter.$ARCH/grok_exporter . -cp -a logstash-patterns-core/patterns dist/grok_exporter.$ARCH -cp -a example dist/grok_exporter.$ARCH +echo "Building grok_exporter-$VERSION.$ARCH" +mkdir -p dist/grok_exporter-$VERSION.$ARCH +go build -o dist/grok_exporter-$VERSION.$ARCH/grok_exporter . +cp -a logstash-patterns-core/patterns dist/grok_exporter-$VERSION.$ARCH +cp -a example dist/grok_exporter-$VERSION.$ARCH cd dist -sed -i.bak s,/logstash-patterns-core/patterns,/patterns,g grok_exporter.$ARCH/example/*.yml -rm grok_exporter.$ARCH/example/*.yml.bak -zip --quiet -r grok_exporter.$ARCH.zip grok_exporter.$ARCH -rm -r grok_exporter.$ARCH +sed -i.bak s,/logstash-patterns-core/patterns,/patterns,g grok_exporter-$VERSION.$ARCH/example/*.yml +rm grok_exporter-$VERSION.$ARCH/example/*.yml.bak +zip --quiet -r grok_exporter-$VERSION.$ARCH.zip grok_exporter-$VERSION.$ARCH +rm -r grok_exporter-$VERSION.$ARCH cd .. diff --git a/version.go b/version.go index 8cd30e29..2af988db 100644 --- a/version.go +++ b/version.go @@ -1,6 +1,6 @@ package main const ( - VERSION = "v0.0.1" + VERSION = "0.0.1" BUILD_DATE = "2016-05-08" )