summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-02-10 23:52:47 -0800
committerBryan Newbold <bnewbold@archive.org>2021-02-10 23:52:47 -0800
commit2bbd9a965df9e65f25d3611d1bfa003d14856a61 (patch)
tree33abaf22eb49b4acdae040005d57574cb58199a2
parent05249abe420e5a5439208277f3dc40abd250bb1b (diff)
downloadfatcat-cli-2bbd9a965df9e65f25d3611d1bfa003d14856a61.tar.gz
fatcat-cli-2bbd9a965df9e65f25d3611d1bfa003d14856a61.zip
make: homebrew helper target
-rw-r--r--Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 985a327..eb98380 100644
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,10 @@ fmt: ## Run syntax re-formatting
build: ## Build
cargo build
+.PHONY: build-release
+build-release: ## Build for release
+ cargo build --release
+
.PHONY: completions
completions: build ## generate shell completions
./target/debug/fatcat-cli --shell-completions bash status > extra/fatcat-cli.bash_completions
@@ -35,3 +39,12 @@ manpage: extra/fatcat-cli.1 ## Rebuild manpage using scdoc
.PHONY: deb
deb: ## Build debian packages (.deb files)
cargo deb -p fatcat-cli
+
+.PHONY: brew-folder
+brew-folder: extra/fatcat-cli.1 completions build-release ## Copy files into homebrew folder
+ mkdir -p target/homebrew/doc
+ cp extra/fatcat-cli.1 target/homebrew/doc/fatcat-cli.1
+ mkdir -p target/homebrew/complete
+ cp extra/fatcat-cli.bash_completions target/homebrew/complete/fatcat-cli.bash
+ cp extra/fatcat-cli.zsh_completions target/homebrew/complete/_fatcat-cli
+ cp target/release/fatcat-cli target/homebrew/fatcat-cli