yr/Makefile
Tim Hårek Andreassen 0d9cea8b95
release: v0.0.6
Signed-off-by: Tim Hårek Andreassen <tim@harek.no>
2024-11-13 19:29:13 +01:00

41 lines
658 B
Makefile

prefix = /usr/local
# Support upper case PREFIX
ifneq ($(PREFIX),)
prefix := $(PREFIX)
endif
bindir = $(prefix)/bin
builddir = ./build
VERSION = 0.0.6
.PHONY: build
build:
go build -o $(builddir)/
.PHONY: install
install: build
install -m 0755 $(builddir)/yr $(bindir)
.PHONY: clean
clean:
rm -f $(builddir)/*
rm -rf yr-*
rm -f yr-*.tar.gz
.PHONY: build-release
build-release: build
mkdir -p yr-$(VERSION)
cp $(builddir)/yr* yr-$(VERSION)/
tar czf yr-$(VERSION)-$(GOOS)-$(ARCH).tar.gz yr-$(VERSION)
hut git artifact upload --rev $(TAG) yr-$(VERSION)-$(GOOS)-$(ARCH).tar.gz
.PHONY: test
test:
go test ./...
.PHONY: vet
vet:
go vet ./...