Skip to content

Commit

Permalink
pre-release information
Browse files Browse the repository at this point in the history
  • Loading branch information
clarsonneur committed Jun 8, 2017
1 parent 60516e7 commit 9b37c6e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
8 changes: 7 additions & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,13 @@ func (a *Forj) init() {

a.app = kingpin.New(os.Args[0], forjj_help).UsageTemplate(DefaultUsageTemplate)

version := "forjj V"+ VERSION
var version string
if PRERELEASE {
version = "forjj pre-release V"+ VERSION
} else {
version = "forjj V"+ VERSION
}

if build_branch != "master" {
version += fmt.Sprintf(" branch %s - %s - %s", build_branch, build_date, build_commit)
}
Expand Down
10 changes: 8 additions & 2 deletions bin/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ then
git tag -d $TAG
else
TAG="$(grep VERSION version.go | sed 's/const VERSION="\(.*\)"/\1/g')"
PRE_RELEASE="$(grep VERSION version.go | sed 's/const PRERELEASE="\(.*\)"/\1/g')"
if [ "$(git tag | grep "^$TAG$")" != "" ]
then
echo "Unable to publish $TAG. Already published and released."
Expand Down Expand Up @@ -91,10 +92,15 @@ then
if [ $? -ne 0 ]
then
# TODO: Remove hardcoded binary name.
gothub release --tag $TAG --name forjj --description "Latest version of forjj."
gothub release --tag $TAG --name forjj --description "Latest version of forjj." -p
fi
else
gothub release --tag $TAG --name forjj --description "forjj version $TAG."
GOTHUB_PARS=""
if [ "$PRE_RELEASE" = true ]
then
GOTHUB_PARS="-p"
fi
gothub release --tag $TAG --name forjj --description "forjj version $TAG." $GOTHUB_PARS
fi

gothub upload --tag $TAG --name forjj --file $GOPATH/bin/forjj --replace
1 change: 1 addition & 0 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ package main
// This version file is used by forjj and publish.sh for tagging.
const VERSION="0.9-a"

const PRERELEASE=true

0 comments on commit 9b37c6e

Please sign in to comment.