about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-11-22 18:21:39 +0100
committerbptato <nincsnevem662@gmail.com>2024-11-22 18:21:39 +0100
commit86c91574650b7c55ea19e3c40712a6875fe5a6c0 (patch)
tree92d2a4e3c445cfc4fd484df641cf6bec0a981f6d
parenta7ec9c48860ffe1169e387c3a9af74a7577cf77e (diff)
downloadchawan-86c91574650b7c55ea19e3c40712a6875fe5a6c0.tar.gz
Version 1.0.2
-rw-r--r--NEWS4
-rw-r--r--chame.nimble2
-rw-r--r--chame/version.nim2
-rwxr-xr-xupdver39
4 files changed, 40 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index 30e08f54..7f160d04 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+1.0.2 (2024.11.22)
+* Minor optimizations
+* Minor documentation updates
+
 1.0.1 (2024.07.28)
 * Minor optimization
 * Add test directory to skipDirs
diff --git a/chame.nimble b/chame.nimble
index 189fcec1..4315be6e 100644
--- a/chame.nimble
+++ b/chame.nimble
@@ -1,6 +1,6 @@
 # Package
 
-version       = "1.0.1"
+version       = "1.0.2"
 author        = "bptato"
 description   = "HTML5 parser for Chawan"
 license       = "Unlicense"
diff --git a/chame/version.nim b/chame/version.nim
index 7746e730..d1dbc782 100644
--- a/chame/version.nim
+++ b/chame/version.nim
@@ -1,3 +1,3 @@
 const Major* = 1
 const Minor* = 0
-const Patch* = 1
+const Patch* = 2
diff --git a/updver b/updver
index 06945f70..eb02af93 100755
--- a/updver
+++ b/updver
@@ -1,11 +1,14 @@
 #!/bin/sh
 
-if ! test "$1"
-then	echo "Usage: updver [version]" >&2
+die()
+{
+	echo "$*" 2>&1
 	exit 1
-fi
+}
 
-vv="$(printf '%s\n' "$1" | sed 's/v//')"
+test "$1" || die "Usage: updver [version]"
+
+vv=$(printf '%s\n' "$1" | sed 's/v//')
 
 major=$(printf '%s\n' "$vv" | sed 's/\..*//')
 minor=$(printf '%s\n' "$vv" | sed 's/[^.]*\.\([^.]*\)\..*/\1/')
@@ -13,6 +16,24 @@ patch=$(printf '%s\n' "$vv" | sed 's/.*\.//')
 
 vs="$major.$minor.$patch"
 
+oldhdr=$(head -1 NEWS)
+
+msgfile=$(mktemp)
+
+printf '%s (%s)\n\n' "$vs" "$(date +'%Y.%m.%d')" > "$msgfile"
+cat NEWS >> "$msgfile"
+
+test -n "$EDITOR" || die 'missing $EDITOR env var'
+$EDITOR "$msgfile"
+
+printf 'Ok? (y/n) '
+read -r ok
+case "$ok" in
+y|Y)	;;
+*)	die "Aborted. (File is $msgfile.)" ;;
+esac
+
+cp "$msgfile" NEWS
 echo "/version/c
 version       = \"$vs\"
 .
@@ -27,4 +48,12 @@ wq" | ed -s chame/version.nim
 
 git add .
 git commit -m "Version $vs"
-git tag -a "v$vs"
+
+tmp2=$(mktemp)
+
+while read line
+do	if test "$line" = "$oldhdr"; then break; fi
+	printf '%s\n' "$line"
+done <NEWS >"$tmp2"
+
+git tag -faeF "$tmp2" "v$vs"