Skip to content

Commit

Permalink
Added Makefile to help automate build, test, and publish.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver, Jonathan committed Jun 3, 2016
1 parent 83be1ae commit 2b81b63
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/make -f

SOURCE_VERSION := 1.0

version:
$(eval PREFIX := $(SOURCE_VERSION).)
$(eval CURRENT := $(shell git describe 2>/dev/null))
$(eval EXPECTED := $(PREFIX)$(shell git tag -l "$(PREFIX)*" | wc -l | xargs expr -1 +))
$(eval INCREMENTED := $(PREFIX)$(shell git tag -l "$(PREFIX)*" | wc -l | xargs expr 0 +))
@if [ "$(CURRENT)" != "$(EXPECTED)" ]; then git tag -a "$(INCREMENTED)" -m "" 2>/dev/null || true; fi

0 comments on commit 2b81b63

Please sign in to comment.