forked from rapid7/r7insight_ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (28 loc) · 1.33 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.PHONY: test build bump-major bump-minor bump-patch help
.DEFAULT_GOAL := help
test: ## Run the unit tests
bundle exec rake --trace
build: ## Build the ruby gem
gem build r7insight.gemspec
bump-major: ## Bump the major version (1.0.0 -> 2.0.0)
@which bump || (echo "You do not have 'bump' installed or in your PATH.\n" \
"Please run 'gem install bump'\n" "GitHub: https://github.com/gregorym/bump" && false)
@bump major
bump-minor: ## Bump the minor version (0.1.0 -> 0.2.0)
@which bump || (echo "You do not have 'bump' installed or in your PATH.\n" \
"Please run 'gem install bump'\n" "GitHub: https://github.com/gregorym/bump" && false)
@bump minor
bump-patch: ## Bump the patch version (0.0.1 -> 0.0.2)
@which bump || (echo "You do not have 'bump' installed or in your PATH.\n" \
"Please run 'gem install bump'\n" "GitHub: https://github.com/gregorym/bump" && false)
@bump patch
help: ## Shows help
@IFS=$$'\n' ; \
help_lines=(`fgrep -h "##" ${MAKEFILE_LIST} | fgrep -v fgrep | sed -e 's/\\$$//'`); \
for help_line in $${help_lines[@]}; do \
IFS=$$'#' ; \
help_split=($$help_line) ; \
help_command=`echo $${help_split[0]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
help_info=`echo $${help_split[2]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
printf "%-30s %s\n" $$help_command $$help_info ; \
done