Skip to content

Commit 50e6a66

Browse files
committed
add 'make push'
1 parent 0a3a59c commit 50e6a66

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Makefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FLOW_VERSION ?= $(shell node -p 'require("./package.json").version')
1+
VERSION ?= $(shell node -p 'require("./package.json").version')
2+
FLOW_VERSION := $(patsubst v%,%,$(VERSION))
23
FLOW_BINS = \
34
flow-linux64-v$(FLOW_VERSION)/flow \
45
flow-osx-v$(FLOW_VERSION)/flow \
@@ -11,6 +12,11 @@ all: clean build test
1112
clean:
1213
rm -rf flow-*-v* SHASUM256.txt
1314

15+
.PHONY: bump
16+
bump:
17+
sed -i.bak 's/"version": ".*"/"version": "$(FLOW_VERSION)"/' package.json
18+
rm package.json.bak
19+
1420
.PHONY: test
1521
test: $(FLOW_BINS)
1622
shasum -c SHASUM256.txt
@@ -19,6 +25,13 @@ test: $(FLOW_BINS)
1925
.PHONY: build
2026
build: clean SHASUM256.txt
2127

28+
.PHONY: push
29+
push: build test
30+
git commit -am "v$(FLOW_VERSION)"
31+
git tag -a "v$(FLOW_VERSION)" -m "v$(FLOW_VERSION)"
32+
git push
33+
git push --tags
34+
2235
SHASUM256.txt: $(FLOW_BINS)
2336
shasum -a 256 $^ > $@
2437

0 commit comments

Comments
 (0)