forked from rename-this/vhs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (42 loc) · 1.23 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.PHONY: test
test:
docker build \
--target base \
--tag vhs:test \
--file docker/vhs/Dockerfile \
. && \
docker run \
--rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--network host \
-i vhs:test \
go test -cover -race -coverprofile coverage.out `go list ./... | grep -v -f .testignore`
.PHONY: test-host
test-host:
go test -cover -race -coverprofile coverage.out `go list ./... | grep -v -f .testignore`
.PHONY: dev
dev:
docker build -t vhs:dev . && \
docker run -d -v $$(pwd):/go/vhs -p 8888:8888 -v $$HOME/.config/gcloud:/root/.config/gcloud --name vhs_dev -it vhs:dev
VERSION ?= dev
.PHONY: docker-vhs
docker-vhs:
docker build \
-f ./docker/vhs/Dockerfile \
-t ghcr.io/rename-this/vhs:$(VERSION) \
-t ghcr.io/rename-this/vhs:$$(git rev-parse --short HEAD) \
-t ghcr.io/rename-this/vhs:latest \
.
.PHONY: docker-vhs-push
docker-vhs-push: docker-vhs
docker push ghcr.io/rename-this/vhs:$(VERSION) && \
docker push ghcr.io/rename-this/vhs:$$(git rev-parse --short HEAD) && \
docker push ghcr.io/rename-this/vhs:latest
docs: submods
hugo serve
docs-ci: init submods
hugo -s site -b / --gc
init: submods
npm install -D --save postcss postcss-cli autoprefixer
submods:
git submodule update --init --recursive