Skip to content

Commit 962c9a8

Browse files
committed
Add tag command
1 parent de97372 commit 962c9a8

3 files changed

Lines changed: 25 additions & 4 deletions

File tree

.github/copilot-instructions.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
description: 'Instructions for rops repo'
3+
applyTo: '/**'
4+
---
5+
6+
7+
# Makefile Instructions
8+
9+
- Keep all targets sorted alphabetically.
10+
- targets should be separated by a one blank line only.
11+
- Each target should have a one-line description, starting with `##`, that describes what the target does. This description is used by the `help` target to generate documentation for all targets.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
@readme.md
2+
@.github/copilot-instructions.md

Makefile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
.PHONY: help
2-
help:
2+
help: ## Show this help message
33
@echo ======================================================================================
44
@echo rOps
55
@echo ======================================================================================
66
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
77
@echo ======================================================================================
88

9-
109
.PHONY: lint
1110
lint: ## Run linters and fix issues
1211
@./dev/lint-rs fix
1312

14-
15-
.PHONY: lint
13+
.PHONY: lint-check
1614
lint-check: ## Run linters
1715
@./dev/lint-rs
16+
17+
.PHONY: tag
18+
tag: ## Tag current version (from Cargo.toml) and push
19+
$(eval VERSION := $(shell grep '^version' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/'))
20+
@read -p "Tagging with v$(VERSION), are you sure? [Y/n] " ans; \
21+
ans=$${ans:-Y}; \
22+
if [ "$$ans" = "Y" ] || [ "$$ans" = "y" ]; then \
23+
git tag v$(VERSION) && git push origin v$(VERSION); \
24+
else \
25+
echo "Aborted."; \
26+
fi

0 commit comments

Comments
 (0)