Skip to content

Commit

Permalink
some checks in make release
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaong committed Sep 21, 2016
1 parent e075aa1 commit 2a134a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
VERSION = $(shell crystal eval 'require "yaml"; s = YAML.parse(File.read("./shard.yml")); puts s["version"]')
CONST_VERSION = $(shell crystal eval 'require "./src/immutable/version"; puts Immutable::VERSION')
GIT_STATUS = $(shell git status -s)

docsite:
crystal docs && git checkout gh-pages && mkdir -p api && cp -r doc/. api && git add api && git commit -m "generate docs" && git push && git checkout master

release:
@test "$(VERSION)" == "$(CONST_VERSION)" || { echo "Error: version in shards.yml does not match version in code"; exit 1; }
@test "$(GIT_STATUS)" == "" || { echo "Error: uncommitted changes"; exit 1; }
git fetch && git tag v$(VERSION) origin/master && git push origin v$(VERSION)
open https://github.com/lucaong/immutable/releases/new?tag=v$(VERSION)

Expand Down

0 comments on commit 2a134a4

Please sign in to comment.