Archived
1
0
Fork 0
This repository has been archived on 2024-12-18. You can view files and clone it, but cannot push or open issues or pull requests.
flexassistant/Makefile
Julien Riou 47eed6fbee
docs: Update Makefile and README for release
Signed-off-by: Julien Riou <julien@riou.xyz>
2021-10-06 19:12:49 +02:00

18 lines
No EOL
579 B
Makefile

APPVERSION := $(shell cat ./VERSION)
GOVERSION := $(shell go version | awk '{print $$3}')
GITCOMMIT := $(shell git log -1 --oneline | awk '{print $$1}')
LDFLAGS = -X main.AppVersion=${APPVERSION} -X main.GoVersion=${GOVERSION} -X main.GitCommit=${GITCOMMIT}
PLATFORM := $(shell uname -s)
ARCH := $(shell uname -m)
.PHONY: clean
build:
go build -ldflags "${LDFLAGS}" -o bin/flexassistant *.go
release:
go build -ldflags "${LDFLAGS}" -o bin/flexassistant-${APPVERSION}-${PLATFORM}-${ARCH} *.go
sha256sum bin/flexassistant-${APPVERSION}-${PLATFORM}-${ARCH}
clean:
rm -rf bin