1
Fork 0

sha256sum

main
Motiejus Jakštys 2021-08-23 16:42:57 +03:00
parent 48800cee35
commit ef583c159f
3 changed files with 15 additions and 7 deletions

View File

@ -11,8 +11,9 @@ tasks:
- test: |
make -C undocker coverage.html
- lint: |
make -C undocker -j$(nproc) -O lint
- all: |
make -C undocker -j$(nproc) -O all
make -C undocker -O -j$(nproc) lint
- binaries: |
make -C undocker -O -j$(nproc) sha256sum.txt
cat undocker/sha256sum.txt
artifacts:
- undocker/coverage.html

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
/undocker
/undocker-*
coverage.html
sha256sum.txt*

View File

@ -8,7 +8,7 @@ GOOSARCHS = linux/amd64 \
windows/amd64/.exe
define undockertarget
TARGETS += undocker-$(1)-$(2)$(firstword $(3))
UNDOCKERS += undocker-$(1)-$(2)$(firstword $(3))
undocker-$(1)-$(2)$(firstword $(3)): $(GODEPS)
CGO_ENABLED=0 GOOS=$(1) GOARCH=$(2) go build -o $$@
endef
@ -17,7 +17,7 @@ $(foreach goosarch,$(GOOSARCHS),\
$(eval $(call undockertarget,$(word 1,$(subst /, ,$(goosarch))),$(word 2,$(subst /, ,$(goosarch))),$(word 3,$(subst /, ,$(goosarch))))))
.PHONY: all
all: $(TARGETS) coverage.html
all: $(UNDOCKERS) coverage.html
.PHONY: test
test:
@ -41,6 +41,12 @@ coverage.out: $(GODEPS)
coverage.html: coverage.out
go tool cover -html=$< -o $@
sha256sum.txt: $(UNDOCKERS)
sha256sum $(UNDOCKERS) > $@
sha256sum.txt.asc: sha256sum.txt
gpg --clearsign $<
.PHONY: clean
clean:
rm -f coverage.html $(TARGETS)
rm -f $(UNDOCKERS) coverage.html sha256sum.txt sha256sum.txt.asc