28 lines
733 B
Makefile
28 lines
733 B
Makefile
PROJECT = $(shell basename $(CURDIR))
|
|
GITHASH = $(shell git rev-parse --short HEAD)
|
|
|
|
debug:
|
|
cargo run
|
|
|
|
build:
|
|
cargo build --release
|
|
ls -lh target/release/$(PROJECT)
|
|
|
|
release: build
|
|
tar -czf $(PROJECT)_$(GITHASH).tar.gz -C target/release $(PROJECT)
|
|
tar -tvf $(PROJECT)_$(GITHASH).tar.gz
|
|
|
|
clean:
|
|
cargo clean
|
|
rm -f *.tar.gz
|
|
rm -f *.tar.gz.minisig
|
|
|
|
source-release:
|
|
git archive --format=tar.gz --prefix=$(PROJECT)/ -o $(PROJECT)_$(GITHASH)_source.tar.gz HEAD
|
|
tar -tvf $(PROJECT)_$(GITHASH)_source.tar.gz
|
|
|
|
sign: release source-release
|
|
minisign -Sm $(PROJECT)_$(GITHASH).tar.gz $(PROJECT)_$(GITHASH)_source.tar.gz
|
|
|
|
publish: sign
|
|
scp $(PROJECT)_$(GITHASH).tar.gz* $(PROJECT)_$(GITHASH)_source.tar.gz* server:/public/$(PROJECT)/
|