diff --git a/ChangeLog.rst b/ChangeLog.rst new file mode 100644 index 0000000..316f771 --- /dev/null +++ b/ChangeLog.rst @@ -0,0 +1,10 @@ +=============================================================================== +ChangeLog +=============================================================================== + +`v0.0.1`_ (2018-04-17) +--------------------------- + +* Initial release + +.. _v0.0.1: https://github.com/ubccr/terf/releases/tag/v0.0.1 diff --git a/cmd/terf/main.go b/cmd/terf/main.go index 9653303..fc76050 100644 --- a/cmd/terf/main.go +++ b/cmd/terf/main.go @@ -22,12 +22,16 @@ import ( "github.com/urfave/cli" ) +var ( + TerfVersion = "dev" +) + func main() { app := cli.NewApp() app.Name = "terf" app.Authors = []cli.Author{cli.Author{Name: "Andrew E. Bruno", Email: "aebruno2@buffalo.edu"}} app.Usage = "terf" - app.Version = "0.0.1" + app.Version = TerfVersion app.Flags = []cli.Flag{ &cli.BoolFlag{Name: "debug,d", Usage: "Print verbose messages"}, } diff --git a/scripts/make-release.sh b/scripts/make-release.sh new file mode 100755 index 0000000..4fe0dda --- /dev/null +++ b/scripts/make-release.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +TERF_DIR='./.terf-release' +VERSION=`git describe --long --tags --dirty --always | sed -e 's/^v//'` +for os in linux darwin windows +do + for arch in amd64 386 + do + NAME=terf-${VERSION}-${os}-${arch} + REL_DIR=${TERF_DIR}/${NAME} + cd ./cmd/terf && GOOS=$os GOARCH=$arch go build -ldflags "-X main.TerfVersion=$VERSION" . + cd ../../ + rm -Rf ${TERF_DIR} + mkdir -p ${REL_DIR} + cp ./cmd/terf/terf* ${REL_DIR}/ + cp ./README.rst ${REL_DIR}/ + cp ./AUTHORS.rst ${REL_DIR}/ + cp ./ChangeLog.rst ${REL_DIR}/ + cp ./LICENSE ${REL_DIR}/ + + cd ${TERF_DIR} && zip -r ${NAME}.zip ${NAME} + mv ${NAME}.zip ../ + cd ../ + rm -Rf ${TERF_DIR} + rm ./cmd/terf/terf* + done +done