summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrare-magma <rare-magma@posteo.eu>2024-02-14 22:35:46 +0100
committerDaniel Milde <daniel@milde.cz>2024-02-14 23:44:50 +0100
commit62b52fa05ac5e54f4791b429a99945a8c09a3b45 (patch)
tree3fc57d56e7c976e1245ff3fe87b3be520d9a9995
parent752783a1bcafb02201a6bb92c057b709c63d00f2 (diff)
build: add docker build to makefile
Signed-off-by: rare-magma <rare-magma@posteo.eu>
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 86bb739..c0daa82 100644
--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,10 @@ build-static:
mkdir -p dist
GOFLAGS="$(GOFLAGS_STATIC)" CGO_ENABLED=0 go build -ldflags="$(LDFLAGS)" -o dist/$(NAME) $(PACKAGE)/$(CMD_GDU)
+build-docker:
+ @echo "Version: " $(VERSION)
+ docker build . --tag ghcr.io/dundee/gdu:$(VERSION)
+
build-all:
@echo "Version: " $(VERSION)
-mkdir dist
@@ -70,6 +74,8 @@ build-all:
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="$(LDFLAGS)" -o dist/gdu_linux_arm64 $(PACKAGE)/$(CMD_GDU)
CGO_ENABLED=0 GOOS=android GOARCH=arm64 go build -ldflags="$(LDFLAGS)" -o dist/gdu_android_arm64 $(PACKAGE)/$(CMD_GDU)
+ docker build . --tag ghcr.io/dundee/gdu:$(VERSION)
+
cd dist; for file in gdu_linux_* gdu_darwin_* gdu_netbsd_* gdu_openbsd_* gdu_freebsd_* gdu_android_*; do tar czf $$file.tgz $$file; done
cd dist; for file in gdu_windows_*; do zip $$file.zip $$file; done
@@ -137,6 +143,7 @@ shasums:
cd dist; gpg --sign --armor --detach-sign sha256sums.txt
release:
+ docker push ghcr.io/dundee/gdu:$(VERSION)
gh release create -t "gdu $(VERSION)" $(VERSION) ./dist/*
install-dev-dependencies: