Compare commits

...

1 commit
1.0.0 ... main

Author SHA1 Message Date
792eff78cc
chore: Add release action in Makefile
All checks were successful
/ pre-commit (push) Successful in 1m13s
Signed-off-by: Julien Riou <julien@riou.xyz>
2025-08-28 16:49:27 +02:00
2 changed files with 9 additions and 1 deletions

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
bin
releases
collerd.db
!docker/collerd.json
collerd.json

View file

@ -1,6 +1,8 @@
APPVERSION := $(shell cat ./VERSION)
GOVERSION := $(shell go version | awk '{print $$3}')
GITCOMMIT := $(shell git log -1 --oneline | awk '{print $$1}')
OS := $(shell uname -s | tr [A-Z] [a-z])
ARCH := $(shell uname -m | tr [A-Z] [a-z])
LDFLAGS = -X main.AppVersion=${APPVERSION} -X main.GoVersion=${GOVERSION} -X main.GitCommit=${GITCOMMIT}
.PHONY: clean test
@ -12,6 +14,11 @@ build:
&& go build -ldflags "${LDFLAGS}" -o ../bin/coller cmd/coller/main.go \
)
archive:
(mkdir -p releases && cd bin && tar cvzpf ../releases/coller-${APPVERSION}-${OS}-${ARCH}.tar.gz * && cd ../releases && sha256sum *.tar.gz)
release: build archive
test:
(cd src \
&& go test internal/*.go \
@ -19,4 +26,4 @@ test:
)
clean:
rm -rf bin
rm -rf bin releases