Skip to content

Commit

Permalink
build: add docker build to makefile
Browse files Browse the repository at this point in the history
Signed-off-by: rare-magma <[email protected]>
  • Loading branch information
rare-magma committed Feb 14, 2024
1 parent c0643e3 commit 64db7af
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 64db7af

Please sign in to comment.