From 3ea4ae1de32985489d6774bf0ec864878ddbbbf4 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 3 Mar 2018 18:53:13 +0100 Subject: Makefile: Add a `release` target Script the release process to make it easier to build a tar containing the executable, Bash completion, and the man page. --- Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1248d57..8ed6ec4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ TRANSFORMED_MAN_PAGE := doc/passextract.1.transformed +VERSION := 0.3.0 +RELEASE_DIR := passextract-$(VERSION) $(TRANSFORMED_MAN_PAGE): doc/passextract.1.txt sed 's/`/*/g' $< > $@ @@ -11,4 +13,15 @@ doc/passextract.1: $(TRANSFORMED_MAN_PAGE) doc: doc/passextract.1 clean_transformed -.PHONY: clean_transformed doc +release: + cargo build --release && \ + mkdir -p $(RELEASE_DIR) && \ + cp target/release/passextract \ + passextract.bash-completion \ + doc/passextract.1 \ + $(RELEASE_DIR) && \ + tar cjvf passextract-$(VERSION)_osx_amd64.tar.bz2 \ + $(RELEASE_DIR) && \ + rm -rf $(RELEASE_DIR) + +.PHONY: clean_transformed doc release -- cgit v1.2.3