yr/Makefile
Tim Hårek Andreassen 4c1a70e412
chore: Replace justfile with Makefile
Signed-off-by: Tim Hårek Andreassen <tim@harek.no>
2024-10-26 19:04:22 +02:00

41 lines
657 B
Makefile

prefix = /usr/local
# Support upper case PREFIX
ifneq ($(PREFIX),)
prefix := $(PREFIX)
endif
bindir = $(prefix)/bin
builddir = ./build
VERSION = 0.0.5
.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 ./...