forked from superbrothers/ga
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (30 loc) · 806 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
NODE_VERSION ?= 12
NODE_IMAGE := node:$(NODE_VERSION)
DOCKER_RUN := docker run --rm -v "$${PWD}:/app" -w /app -it $(NODE_IMAGE)
NPM ?= $(DOCKER_RUN) npm
VERSION := $(shell cat package.json | jq -r '.version')
IMAGE := docker.io/superbrothers/ga:$(VERSION)
.PHONY: image
image:
DOCKER_BUILDKIT=1 docker build --build-arg NODE_VERSION=$(NODE_VERSION) -t $(IMAGE) .
.PHONY: push-image
push-image:
docker push $(IMAGE)
.PHONY: dist
dist:
zip ga.zip README.md LICENSE bin/ga
shasum -a 256 ga.zip | awk '{print $$1}' > ga.zip.sha256
.PHONY: update
update:
@./hack/update-readme.sh
@./hack/update-bin.sh
.PHONY: verify
verify:
@./hack/verify-readme.sh
@./hack/verify-bin.sh
.PHONY: clean
clean:
$(RM) ga.zip ga.zip.sha256 *.tgz
.PHONY: run-in-node
run-in-node:
$(DOCKER_RUN) /bin/bash