-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (23 loc) · 983 Bytes
/
Makefile
File metadata and controls
26 lines (23 loc) · 983 Bytes
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
.PHONY: help
help: ## Show this help message
@echo ======================================================================================
@echo rOps
@echo ======================================================================================
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
@echo ======================================================================================
.PHONY: lint
lint: ## Run linters and fix issues
@./dev/lint-rs fix
.PHONY: lint-check
lint-check: ## Run linters
@./dev/lint-rs
.PHONY: tag
tag: ## Tag current version (from Cargo.toml) and push
$(eval VERSION := $(shell grep '^version' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/'))
@read -p "Tagging with v$(VERSION), are you sure? [Y/n] " ans; \
ans=$${ans:-Y}; \
if [ "$$ans" = "Y" ] || [ "$$ans" = "y" ]; then \
git tag -a v$(VERSION) -m "v$(VERSION)" && git push origin v$(VERSION); \
else \
echo "Aborted."; \
fi