Skip to content

Commit

Permalink
Merge pull request #2 from watawuwu/fix/bump
Browse files Browse the repository at this point in the history
Fix/bump
  • Loading branch information
watawuwu authored Dec 23, 2018
2 parents 2a33a81 + 9fbdd9f commit 4be7ca5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 19 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,31 @@ 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)
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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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
Expand Down

0 comments on commit 4be7ca5

Please sign in to comment.