Skip to content

Commit 32ccaf1

Browse files
authored
feat: support semantic versioning with svu. (weirdNox#93)
1 parent 6f292d7 commit 32ccaf1

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

Makefile

+32
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,35 @@ compile: cask
1818
.PHONY: test
1919
test: compile
2020
cask exec buttercup -L .
21+
22+
23+
# The file where the version needs to be replaced
24+
TARGET_FILE = org-noter.el
25+
26+
# Target to display the current version without overwriting the VERSION file
27+
current-version:
28+
@CURRENT_VERSION=$$(svu current); \
29+
echo "Current Version: $$CURRENT_VERSION"
30+
31+
# Target to bump the patch version
32+
bump-patch:
33+
@NEW_VERSION=$$(svu patch); \
34+
sed -i.bak -E "s/^;; Version:.*/;; Version: $$NEW_VERSION/" $(TARGET_FILE); \
35+
echo "New Patch Version: $$NEW_VERSION"; \
36+
git add $(TARGET_FILE); \
37+
git commit -m "Bump patch version to $$NEW_VERSION"; \
38+
git tag "$$NEW_VERSION"; \
39+
echo "Don't forget to push the new tag."
40+
41+
42+
# Target to bump the minor version
43+
bump-minor:
44+
@NEW_VERSION=$$(svu minor); \
45+
sed -i.bak -E "s/^;; Version:.*/;; Version: $$NEW_VERSION/" $(TARGET_FILE); \
46+
echo "New Patch Version: $$NEW_VERSION"; \
47+
git add $(TARGET_FILE); \
48+
git commit -m "Bump minor version to $$NEW_VERSION"; \
49+
git tag "$$NEW_VERSION"; \
50+
echo "Don't forget to push the new tag."
51+
52+
.PHONY: current-version bump-patch bump-minor

VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v2.0.6

org-noter.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
;; Homepage: https://github.com/org-noter/org-noter
1010
;; Keywords: lisp pdf interleave annotate external sync notes documents org-mode
1111
;; Package-Requires: ((emacs "24.4") (cl-lib "0.6") (org "9.4"))
12-
;; Version: 1.5.0
12+
;; Version: v1.6.0
1313

1414
;; This file is not part of GNU Emacs.
1515

0 commit comments

Comments
 (0)