-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
48 lines (33 loc) · 2.01 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
PROJECT=gotify/build
GO_VERSION?=$(shell cat GO_VERSION)
VCS_REF=$(shell git describe --tags --always)
build-windows-amd64:
docker build --build-arg VCS_REF=${VCS_REF} --build-arg GO_VERSION=${GO_VERSION} -t ${PROJECT}:${GO_VERSION}-windows-amd64 -f Dockerfile.windows-amd64 .
push-windows-amd64:
docker push ${PROJECT}:${GO_VERSION}-windows-amd64
build-windows-386:
docker build --build-arg VCS_REF=${VCS_REF} --build-arg GO_VERSION=${GO_VERSION} -t ${PROJECT}:${GO_VERSION}-windows-386 -f Dockerfile.windows-386 .
push-windows-386:
docker push ${PROJECT}:${GO_VERSION}-windows-386
build-linux-amd64:
docker build --build-arg VCS_REF=${VCS_REF} --build-arg GO_VERSION=${GO_VERSION} -t ${PROJECT}:${GO_VERSION}-linux-amd64 -f Dockerfile.linux-amd64 .
push-linux-amd64:
docker push ${PROJECT}:${GO_VERSION}-linux-amd64
build-linux-386:
docker build --build-arg VCS_REF=${VCS_REF} --build-arg GO_VERSION=${GO_VERSION} -t ${PROJECT}:${GO_VERSION}-linux-386 -f Dockerfile.linux-386 .
push-linux-386:
docker push ${PROJECT}:${GO_VERSION}-linux-386
build-linux-arm-7:
docker build --build-arg VCS_REF=${VCS_REF} --build-arg GO_VERSION=${GO_VERSION} -t ${PROJECT}:${GO_VERSION}-linux-arm-7 -f Dockerfile.linux-arm-7 .
push-linux-arm-7:
docker push ${PROJECT}:${GO_VERSION}-linux-arm-7
build-linux-arm64:
docker build --build-arg VCS_REF=${VCS_REF} --build-arg GO_VERSION=${GO_VERSION} -t ${PROJECT}:${GO_VERSION}-linux-arm64 -f Dockerfile.linux-arm64 .
push-linux-arm64:
docker push ${PROJECT}:${GO_VERSION}-linux-arm64
build-linux-riscv64:
docker build --build-arg VCS_REF=${VCS_REF} --build-arg GO_VERSION=${GO_VERSION} -t ${PROJECT}:${GO_VERSION}-linux-riscv64 -f Dockerfile.linux-riscv64 .
push-linux-riscv64:
docker push ${PROJECT}:${GO_VERSION}-linux-riscv64
build: build-linux-amd64 build-linux-arm-7 build-linux-arm64 build-linux-riscv64 build-linux-386 build-windows-amd64 build-windows-386
push: push-linux-amd64 push-linux-arm-7 push-linux-arm64 push-linux-riscv64 push-linux-386 push-windows-amd64 push-windows-386