-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v0.5.0 release -- version.go updated
- Loading branch information
Randall C. O'Reilly
committed
Jun 12, 2019
1 parent
870ec45
commit 932e261
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Basic Go makefile | ||
|
||
GOCMD=go | ||
GOBUILD=$(GOCMD) build | ||
GOCLEAN=$(GOCMD) clean | ||
GOTEST=$(GOCMD) test | ||
GOGET=$(GOCMD) get | ||
|
||
|
||
all: build | ||
|
||
build: | ||
$(GOBUILD) -v | ||
test: | ||
$(GOTEST) -v ./... | ||
clean: | ||
$(GOCLEAN) | ||
|
||
# NOTE: MUST update version number here prior to running 'make release' | ||
VERS=v0.5.0 | ||
PACKAGE=etable | ||
GIT_COMMIT=`git rev-parse --short HEAD` | ||
VERS_DATE=`date -u +%Y-%m-%d\ %H:%M` | ||
VERS_FILE=version.go | ||
|
||
release: | ||
/bin/rm -f $(VERS_FILE) | ||
@echo "// WARNING: auto-generated by Makefile release target -- run 'make release' to update" > $(VERS_FILE) | ||
@echo "" >> $(VERS_FILE) | ||
@echo "package $(PACKAGE)" >> $(VERS_FILE) | ||
@echo "" >> $(VERS_FILE) | ||
@echo "const (" >> $(VERS_FILE) | ||
@echo " Version = \"$(VERS)\"" >> $(VERS_FILE) | ||
@echo " GitCommit = \"$(GIT_COMMIT)\" // the commit JUST BEFORE the release" >> $(VERS_FILE) | ||
@echo " VersionDate = \"$(VERS_DATE)\" // UTC" >> $(VERS_FILE) | ||
@echo ")" >> $(VERS_FILE) | ||
@echo "" >> $(VERS_FILE) | ||
/bin/cat $(VERS_FILE) | ||
git commit -am "$(VERS) release -- $(VERS_FILE) updated" | ||
git tag -a $(VERS) -m "$(VERS) release" | ||
git push | ||
git push origin --tags | ||
|