]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Start using ~devel versions 2628/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 14 Apr 2024 17:24:32 +0000 (19:24 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 14 Apr 2024 17:39:48 +0000 (19:39 +0200)
Same as systemd. While in development we suffix with ~devel. Also
update the do-a-release script to add a second commit to switch back
to ~devel when we do a release.

We keep the old version in pyproject.toml because suffixing with
~devel conflicts with PEP 440 and python tools complain about that.

mkosi/config.py
tools/do-a-release.sh

index 7ef100789d1b0a816965e8c3fa8219bdb56e5e64..09a1694c6c45895029d021c3e4faa882b302aba8 100644 (file)
@@ -48,7 +48,7 @@ from mkosi.util import (
 )
 from mkosi.versioncomp import GenericVersion
 
-__version__ = "22"
+__version__ = "23~devel"
 
 ConfigParseCallback = Callable[[Optional[str], Optional[Any]], Any]
 ConfigMatchCallback = Callable[[str, Any], bool]
index 6cf4c68e68dbe8e17ceb42491d755c9574b713e6..b4436d3c91f05e45393913a8a30b5b00dcb3f1e3 100755 (executable)
@@ -6,16 +6,26 @@ if [ -z "$1" ] ; then
     exit 1
 fi
 
+VERSION="$1"
+
 if ! git diff-index --quiet HEAD; then
     echo "Repo has modified files."
     exit 1
 fi
 
-sed -r -i "s/^version = \".*\"$/version = \"$1\"/" pyproject.toml
-sed -r -i "s/^__version__ = \".*\"$/__version__ = \"$1\"/" mkosi/config.py
+sed -r -i "s/^version = \".*\"$/version = \"$VERSION\"/" pyproject.toml
+sed -r -i "s/^__version__ = \".*\"$/__version__ = \"$VERSION\"/" mkosi/config.py
 
 git add -p pyproject.toml mkosi
 
-git commit -m "Release $1"
+git commit -m "Release $VERSION"
+
+git tag -s "v$VERSION" -m "mkosi $VERSION"
+
+VERSION="$((VERSION + 1))~devel"
+
+sed -r -i "s/^__version__ = \".*\"$/__version__ = \"$VERSION\"/" mkosi/config.py
+
+git add -p mkosi
 
-git tag -s "v$1" -m "mkosi $1"
+git commit -m "Bump version to $VERSION"