-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
36 lines (28 loc) · 928 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
MANIFEST="pasta-multiarch"
IMAGE="codeberg.org/grisu48/pasta"
default: all
all: pasta pastad
static: pasta-static pastad-static
.PHONY: all test clean
requirements:
go get github.com/BurntSushi/toml
go get github.com/akamensky/argparse
pasta: cmd/pasta/*.go
go build -o pasta $^
pastad: cmd/pastad/*.go
go build -o pastad $^
pasta-static: cmd/pasta/*.go
CGO_ENABLED=0 go build -ldflags="-w -s" -o pasta $^
pastad-static: cmd/pastad/*.go
CGO_ENABLED=0 go build -ldflags="-w -s" -o pastad $^
test: pastad pasta
go test ./...
# TODO: This syntax is horrible :-)
bash -c 'cd test && ./test.sh'
container:
#podman build . -t codeberg.org/grisu48/pasta
buildah manifest create "${MANIFEST}"
buildah build --arch amd64 --tag "${IMAGE}" --manifest "${MANIFEST}" .
buildah build --arch arm64 --tag "${IMAGE}" --manifest "${MANIFEST}" .
container-push:
buildah manifest push --all "${MANIFEST}" "docker://${IMAGE}"