From 7d5d3725689528d6a2f27a3077b01bb48bb28f54 Mon Sep 17 00:00:00 2001 From: Wataru Matsui Date: Sun, 23 Dec 2018 10:43:10 +0900 Subject: [PATCH 1/4] Fix version --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 7e592c8..84db3ac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -125,7 +125,7 @@ dependencies = [ [[package]] name = "cargo-launcher" -version = "0.1.0" +version = "0.2.0" dependencies = [ "dirs 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", From f497d598bb4d092dfc564a2ac65f96c6b2fb488e Mon Sep 17 00:00:00 2001 From: Wataru Matsui Date: Sun, 23 Dec 2018 10:44:19 +0900 Subject: [PATCH 2/4] Add badge of crates.io --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6794d72..cd4b160 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # cargo-launcher [![Build Status](https://travis-ci.com/watawuwu/cargo-launcher.svg?branch=master)](https://travis-ci.com/watawuwu/cargo-launcher) +[![Latest version](https://img.shields.io/crates/v/cargo-launcher.svg)](https://crates.io/crates/cargo-launcher) +[![Documentation](https://docs.rs/cargo-launcher/badge.svg)](https://docs.rs/crate/cargo-launcher) +![License](https://img.shields.io/crates/l/cargo-launcher.svg) If the cargo project is a binary crates, this tool can register the binary in the following launcher. @@ -11,7 +14,6 @@ If the cargo project is a binary crates, this tool can register the binary in th - [Albert](https://albertlauncher.github.io/docs/extensions/python/) - Register as Python extension - ## TODO - [ ] cargo workspace(Only single binary crates) - [ ] customize launcher scripts From 764ee3ab8ab2ce70dd413e7e5bbd3ae144887d8d Mon Sep 17 00:00:00 2001 From: Wataru Matsui Date: Sun, 23 Dec 2018 11:32:35 +0900 Subject: [PATCH 3/4] Add publish task --- Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Makefile b/Makefile index 9697ecb..5aadcdf 100644 --- a/Makefile +++ b/Makefile @@ -66,6 +66,23 @@ cross-test: ## Build all platform -$(MAKE) test CARGO_SUB_OPTIONS="--target x86_64-pc-windows-gnu --release" -$(MAKE) test CARGO_SUB_OPTIONS="--target x86_64-unknown-linux-musl --release" CROSS_COMPILE="x86_64-linux-musl-" +bump-patch: ## Bump up patch + $(MAKE) _bump BUMP_LEVEL=patch +bump-minor: ## Bump up minor + $(MAKE) _bump BUMP_LEVEL=minor +bump-major: ## Bump up major + $(MAKE) _bump BUMP_LEVEL=major + +_bump: + $(CARGO_COMMAND) bump $(BUMP_LEVEL) + $(CARGO_COMMAND) metadata --format-version 1 > /dev/null + git add Cargo.toml Cargo.lock + git commit -m "Bump up version number to $$($(CARGO_COMMAND) read-manifest | jq -r '.version')" + +publish: ## Publish to crates.io + $(CARGO_COMMAND) package + $(CARGO_COMMAND) publish + help: ## Print help echo -e "Usage: make [task]\n\nTasks:" perl -nle 'printf(" \033[33m%-20s\033[0m %s\n",$$1,$$2) if /^([a-zA-Z_-]*?):(?:.+?## )?(.*?)$$/' $(MAKEFILE_LIST) From 9fbdd9f471db9aa1831a73cce9ce550e127285b1 Mon Sep 17 00:00:00 2001 From: Wataru Matsui Date: Sun, 23 Dec 2018 11:32:45 +0900 Subject: [PATCH 4/4] Fix private task --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5aadcdf..6a8b2ba 100644 --- a/Makefile +++ b/Makefile @@ -85,12 +85,12 @@ publish: ## Publish to crates.io help: ## Print help echo -e "Usage: make [task]\n\nTasks:" - perl -nle 'printf(" \033[33m%-20s\033[0m %s\n",$$1,$$2) if /^([a-zA-Z_-]*?):(?:.+?## )?(.*?)$$/' $(MAKEFILE_LIST) + perl -nle 'printf(" \033[33m%s%-20s\033[0m %s\n",$$1,$$2,$$3) if /^([a-zA-Z]){1}([a-zA-Z_-]*?):(?:.+?## )?(.*?)$$/' $(MAKEFILE_LIST) # Config #=============================================================== .SILENT: help # If you want `Target` instead of `Task`, you can avoid it by using dot(.) and slash(/) # ex) node_modules: => ./node_modules: -.PHONY: $(shell egrep -o '^(\._)?[a-z_-]+:' $(MAKEFILE_LIST) | sed 's/://') +.PHONY: $(shell egrep -o '^(_)?[a-zA-Z-]+:' $(MAKEFILE_LIST) | sed 's/://') .DEFAULT_GOAL := build