Skip to content

Commit

Permalink
add 'make push'
Browse files Browse the repository at this point in the history
  • Loading branch information
mroch committed Apr 2, 2020
1 parent 0a3a59c commit 50e6a66
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FLOW_VERSION ?= $(shell node -p 'require("./package.json").version')
VERSION ?= $(shell node -p 'require("./package.json").version')
FLOW_VERSION := $(patsubst v%,%,$(VERSION))
FLOW_BINS = \
flow-linux64-v$(FLOW_VERSION)/flow \
flow-osx-v$(FLOW_VERSION)/flow \
Expand All @@ -11,6 +12,11 @@ all: clean build test
clean:
rm -rf flow-*-v* SHASUM256.txt

.PHONY: bump
bump:
sed -i.bak 's/"version": ".*"/"version": "$(FLOW_VERSION)"/' package.json
rm package.json.bak

.PHONY: test
test: $(FLOW_BINS)
shasum -c SHASUM256.txt
Expand All @@ -19,6 +25,13 @@ test: $(FLOW_BINS)
.PHONY: build
build: clean SHASUM256.txt

.PHONY: push
push: build test
git commit -am "v$(FLOW_VERSION)"
git tag -a "v$(FLOW_VERSION)" -m "v$(FLOW_VERSION)"
git push
git push --tags

SHASUM256.txt: $(FLOW_BINS)
shasum -a 256 $^ > $@

Expand Down

0 comments on commit 50e6a66

Please sign in to comment.