automidically/Makefile
GregoryDosh 4da21be172
Some checks failed
Update Version / Update Version (push) Has been cancelled
fix/feat: small inconsistencies in sha, add changelog
2024-11-24 17:17:22 -06:00

26 lines
No EOL
720 B
Makefile

# git.auengun.net/GregoryDosh/automidically
# Copyright (C) 2020 GregoryDosh
# avoid noisy directory messages
MAKEFLAGS += --no-print-directory
BUILD_COMMIT = $(shell echo $$GITHUB_SHA | cut -c1-10)
ifndef VERSION
VERSION = $(shell cat .version)
endif
.PHONY: clean
clean:
@-rm -rf ./release 2>/dev/null
.PHONY: download_deps
download_deps:
cd cmd/automidically && go get
.PHONY: build
build:
@make clean download_deps
@echo "Building automidically"
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -ldflags '-X main.buildVersion=${VERSION} -X main.buildCommit=${BUILD_COMMIT}' -o release/automidically cmd/automidically/main.go
sha256sum release/automidically | cut -f1 -d " " > release/automidically.sha256