Skip to content

Commit

Permalink
Make buddy works and release scripts work with new versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
buger committed Feb 2, 2017
1 parent 47ac026 commit ad8ccd1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion utils/buddy_build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
echo Set version number
export VERSION=$(perl -n -e'/v(\d+).(\d+).(\d+).(\d+)/'' && print "$1\.$2\.$3\.$4"' version.go)
export VERSION=$(perl -n -e'/v(\d+).(\d+).(\d+)/'' && print "$1\.$2\.$3"' version.go)

echo Generating key
[[ $(gpg --list-keys | grep -w 729EA673) ]] && echo "Key exists" || gpg --import build_key.key
Expand Down
2 changes: 1 addition & 1 deletion utils/buddy_push.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
export VERSION=$(perl -n -e'/v(\d+).(\d+).(\d+).(\d+)/'' && print "$1\.$2\.$3\.$4"' version.go)
export VERSION=$(perl -n -e'/v(\d+).(\d+).(\d+)/'' && print "$1\.$2\.$3"' version.go)

export SOURCEBIN=tyk
export CLIBIN=tyk-cli
Expand Down
2 changes: 1 addition & 1 deletion utils/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Super hacky release script

# ----- SET THE VERSION NUMBER -----
CURRENTVERS=$(perl -n -e'/v(\d+).(\d+).(\d+).(\d+)/'' && print "v$1\.$2\.$3\.$4"' version.go)
CURRENTVERS=$(perl -n -e'/v(\d+).(\d+).(\d+)/'' && print "v$1\.$2\.$3"' version.go)

echo "Current version is: " $CURRENTVERS

Expand Down
2 changes: 1 addition & 1 deletion utils/release_nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
# Super hacky release script

# ----- SET THE VERSION NUMBER -----
CURRENTVERS=$(perl -n -e'/v(\d+).(\d+).(\d+).(\d+)/'' && print "v$1\.$2\.$3\.$4"' version.go)
CURRENTVERS=$(perl -n -e'/v(\d+).(\d+).(\d+)/'' && print "v$1\.$2\.$3"' version.go)

echo "Current version is: " $CURRENTVERS
DATE=$(date +'%m-%d-%Y')
Expand Down
8 changes: 3 additions & 5 deletions utils/set-version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
CURRENTVERS=$(perl -n -e'/v(\d+).(\d+).(\d+).(\d+)/'' && print "v$1\.$2\.$3\.$4"' version.go)
CURRENTVERS=$(perl -n -e'/v(\d+).(\d+).(\d+)/'' && print "v$1\.$2\.$3"' version.go)

echo "Current version is: " $CURRENTVERS

Expand All @@ -9,10 +9,8 @@ echo -n "Minor version [ENTER]: "
read min
echo -n "Patch version [ENTER]: "
read patch
echo -n "Release version [ENTER]: "
read rel

NEWVERSION="v$maj.$min.$patch.$rel"
NEWVERSION="v$maj.$min.$patch"
echo "Setting new version in source: " $NEWVERSION

perl -pi -e 's/var VERSION string = \"(.*)\"/var VERSION string = \"'$NEWVERSION'\"/g' version.go
perl -pi -e 's/var VERSION = \"(.*)\"/var VERSION = \"'$NEWVERSION'\"/g' version.go

0 comments on commit ad8ccd1

Please sign in to comment.