Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
Add make release task
Browse files Browse the repository at this point in the history
now you can run: `make release VERSION=2.2`
which will cut a release, update the libs and generate a .tar.gz
file into the releases folder."

Signed-off-by: Arthur Neves <arthurnn@gmail.com>
  • Loading branch information
arthurnn committed Mar 9, 2018
1 parent 9e14a92 commit f98602b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ _test/
# Go vendored libs
/vendor/*/

# release folder
releases

# Angular2 Bower Libs
/web/vtctld2/.bowerrc~
/web/vtctld2/bower.json~
Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -241,3 +241,15 @@ docker_unit_test:
# then commit and push.
rebalance_tests:
go run test.go -rebalance 5 -remote-stats http://enisoc.com:15123/travis/stats

release:
ifndef VERSION
$(error Set the env var VERSION with the release version)
endif
mkdir -p releases
docker build -f docker/Dockerfile.release -t vitess/release .
docker run -v ${PWD}/releases:/vt/releases --env VERSION=$(VERSION) vitess/release
git tag -m Version\ $(VERSION) v$(VERSION)
echo "A git tag was created, you can push it with:"
echo "git push origin v$(VERSION)"
echo "Also, don't forget the upload releases/v$(VERSION).tar.gz file to GitHub releases"
8 changes: 8 additions & 0 deletions docker/Dockerfile.release
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# We rely on the base image, as that will re-copy the local
# working tree and build it. Because of so, we trust the local
# vendor folder is up to data.
FROM vitess/base

RUN mkdir /vt/releases

CMD tar -czf /vt/releases/v$VERSION.tar.gz --exclude .git .

0 comments on commit f98602b

Please sign in to comment.