sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master sorcery by Ismael Luceno (bca927a6c1b11b0ca3ae102627f88710fa618d69)
- From: Ismael Luceno <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master sorcery by Ismael Luceno (bca927a6c1b11b0ca3ae102627f88710fa618d69)
- Date: Wed, 17 Jan 2024 13:21:34 +0000
GIT changes to master sorcery by Ismael Luceno <ismael AT sourcemage.org>:
Makefile | 11 ++++++++---
bump.awk | 12 ++++++++----
2 files changed, 16 insertions(+), 7 deletions(-)
New commits:
commit bca927a6c1b11b0ca3ae102627f88710fa618d69
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
Fix version bumping
- Revert back to parsing tags, but match version tags only
- Add timestamp (from commit date) to snapshots
Fixes: 468486f77bb3 ("Makefile: version bumping for devel")
commit c86011697bb819ec8388d7964a5a48935a0c4acf
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
Makefile: Make filename depend on branch
- Removes the $(shell ...) GNUism.
- Stable releases get called: sorcery-x.y.z.tar.bz2
(x.y.z comes from etc/sorcery/version)
- Other branches get called: sorcery-${BRANCH}.tar.bz2
diff --git a/Makefile b/Makefile
index 86f8f9c..c80277a 100644
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,11 @@ AWK ?= awk
help:
@${AWK} 'sub(/^#HELP: ?/, "")' ${.MAKE.MAKEFILES}
-BRANCH = $(shell cat etc/sorcery/version)
-release = sorcery-$(BRANCH).tar.bz2
+BRANCH = devel
+VERSION-${BRANCH} := ${BRANCH}
+VERSION-stable != cat etc/sorcery/version
+VERSION := ${VERSION-${BRANCH}}
+release = sorcery-${VERSION}.tar.bz2
ts-scm = .git/refs/heads/master
@@ -24,7 +27,9 @@ release: $(release)
#HELP: bump - Bump version
.PHONY: bump
bump:
- git log -1 --format=%cs | tr -d '-' >etc/sorcery/version
+ git describe --always --tags --match=v\* | \
+ ${AWK} -f bump.awk | \
+ tee etc/sorcery/version
devinst: bump install
diff --git a/bump.awk b/bump.awk
index ad04bde..cbb2b15 100644
--- a/bump.awk
+++ b/bump.awk
@@ -9,12 +9,16 @@ BEGIN {
for (i = 1; i < NF; i++)
$i = $(i+1)
--NF
exit
}
-# bump snapshot
+# add placeholder for unknown predecessor
+!/^v/ { sub(/^/, "0-0-g") }
+
+# add timestamp to snapshot
{
- sub(/.*-g/, strftime("%Y%m%d-g", systime(), 1))
+ "git log -1 --format=%ct" | getline t
+ sub(/-/, strftime("+%Y%m%d-", t, 1))
}
+
+END { print }
- [SM-Commit] GIT changes to master sorcery by Ismael Luceno (bca927a6c1b11b0ca3ae102627f88710fa618d69), Ismael Luceno, 01/17/2024
Archive powered by MHonArc 2.6.24.