blob: a85dbdac85da13b20f009e7bb9039a464a7590a9 [file] [log] [blame]
gio4eb2efe2024-07-12 20:55:31 +04001repo_name ?= dtabidze
2podman ?= docker
3ifeq ($(podman), podman)
4manifest_dest=docker://docker.io/$(repo_name)/rpuppy:latest
5endif
6
giolekvad9725362021-07-14 21:03:11 +04007clean:
8 rm -f rpuppy
9
Giorgi Lekveishvilife432b82023-11-07 15:23:30 +040010build_arm64: export CGO_ENABLED=0
11build_arm64: export GO111MODULE=on
12build_arm64: export GOOS=linux
13build_arm64: export GOARCH=arm64
14build_arm64:
15 go build -o rpuppy_arm64 *.go
giolekvad9725362021-07-14 21:03:11 +040016
Giorgi Lekveishvilife432b82023-11-07 15:23:30 +040017build_amd64: export CGO_ENABLED=0
18build_amd64: export GO111MODULE=on
19build_amd64: export GOOS=linux
20build_amd64: export GOARCH=amd64
21build_amd64:
22 go build -o rpuppy_amd64 *.go
giolekvad9725362021-07-14 21:03:11 +040023
Giorgi Lekveishvilife432b82023-11-07 15:23:30 +040024push_arm64: clean build_arm64
gio4eb2efe2024-07-12 20:55:31 +040025 $(podman) build --platform linux/arm64 --tag=$(repo_name)/rpuppy:arm64 .
26 $(podman) push $(repo_name)/rpuppy:arm64
giolekvad9725362021-07-14 21:03:11 +040027
Giorgi Lekveishvilife432b82023-11-07 15:23:30 +040028push_amd64: clean build_amd64
gio4eb2efe2024-07-12 20:55:31 +040029 $(podman) build --platform linux/amd64 --tag=$(repo_name)/rpuppy:amd64 .
30 $(podman) push $(repo_name)/rpuppy:amd64
Giorgi Lekveishvilife432b82023-11-07 15:23:30 +040031
32push: push_arm64 push_amd64
gio4eb2efe2024-07-12 20:55:31 +040033 $(podman) manifest create $(repo_name)/rpuppy:latest $(repo_name)/rpuppy:arm64 $(repo_name)/rpuppy:amd64
34 $(podman) manifest push $(repo_name)/rpuppy:latest $(manifest_dest)
35 $(podman) manifest rm $(repo_name)/rpuppy:latest