~bptato/chame

86c91574650b7c55ea19e3c40712a6875fe5a6c0 — bptato 11 days ago a7ec9c4 master v1.0.2
Version 1.0.2
4 files changed, 40 insertions(+), 7 deletions(-)

M NEWS
M chame.nimble
M chame/version.nim
M updver
M NEWS => NEWS +4 -0
@@ 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

M chame.nimble => chame.nimble +1 -1
@@ 1,6 1,6 @@
# Package

version       = "1.0.1"
version       = "1.0.2"
author        = "bptato"
description   = "HTML5 parser for Chawan"
license       = "Unlicense"

M chame/version.nim => chame/version.nim +1 -1
@@ 1,3 1,3 @@
const Major* = 1
const Minor* = 0
const Patch* = 1
const Patch* = 2

M updver => updver +34 -5
@@ 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"