From 64db7af2528c4446bc0256136790fc138d18a485 Mon Sep 17 00:00:00 2001 From: rare-magma Date: Wed, 14 Feb 2024 22:35:46 +0100 Subject: [PATCH] build: add docker build to makefile Signed-off-by: rare-magma --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 86bb739db..c0daa827f 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: