From e98e16e45a1e1ef6159c068b0a9c43eb8551dcac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Thu, 15 Aug 2024 16:58:41 -0700 Subject: [PATCH] build: add sha256 checksum file for published binaries --- .gitignore | 9 +++++---- Makefile | 12 +++++++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 13bac4e1..ba53f67d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ -miniflux-* +./*.sha256 ./miniflux -*.rpm -*.deb .idea -.vscode \ No newline at end of file +.vscode +*.deb +*.rpm +miniflux-* \ No newline at end of file diff --git a/Makefile b/Makefile index e93f9814..0925237f 100644 --- a/Makefile +++ b/Makefile @@ -51,33 +51,43 @@ miniflux-no-pie: linux-amd64: @ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@ main.go + @ sha256sum $(APP)-$@ > $(APP)-$@.sha256 linux-arm64: @ CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@ main.go + @ sha256sum $(APP)-$@ > $(APP)-$@.sha256 linux-armv7: @ CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@ main.go + @ sha256sum $(APP)-$@ > $(APP)-$@.sha256 linux-armv6: @ CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@ main.go + @ sha256sum $(APP)-$@ > $(APP)-$@.sha256 linux-armv5: @ CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=5 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@ main.go + @ sha256sum $(APP)-$@ > $(APP)-$@.sha256 darwin-amd64: @ GOOS=darwin GOARCH=amd64 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@ main.go + @ sha256sum $(APP)-$@ > $(APP)-$@.sha256 darwin-arm64: @ GOOS=darwin GOARCH=arm64 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@ main.go + @ sha256sum $(APP)-$@ > $(APP)-$@.sha256 freebsd-amd64: @ CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@ main.go + @ sha256sum $(APP)-$@ > $(APP)-$@.sha256 openbsd-amd64: @ GOOS=openbsd GOARCH=amd64 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@ main.go + @ sha256sum $(APP)-$@ > $(APP)-$@.sha256 windows-amd64: @ GOOS=windows GOARCH=amd64 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@.exe main.go + @ sha256sum $(APP)-$@.exe > $(APP)-$@.exe.sha256 build: linux-amd64 linux-arm64 linux-armv7 linux-armv6 linux-armv5 darwin-amd64 darwin-arm64 freebsd-amd64 openbsd-amd64 windows-amd64 @@ -104,7 +114,7 @@ run: @ LOG_DATE_TIME=1 LOG_LEVEL=debug RUN_MIGRATIONS=1 CREATE_ADMIN=1 ADMIN_USERNAME=admin ADMIN_PASSWORD=test123 go run main.go clean: - @ rm -f $(APP)-* $(APP) $(APP)*.rpm $(APP)*.deb $(APP)*.exe + @ rm -f $(APP)-* $(APP) $(APP)*.rpm $(APP)*.deb $(APP)*.exe $(APP)*.sha256 test: go test -cover -race -count=1 ./...