Skip to content

Commit

Permalink
Add bump2version configuration
Browse files Browse the repository at this point in the history
This adds a new workflow for creating releases, with a VERSION file
that acts as a single source of truth for the project version number.

Helps: #69
  • Loading branch information
dylanmccall committed Sep 20, 2023
1 parent b8dd077 commit 4af319d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[bumpversion]
current_version = 0.5
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)
serialize = {major}.{minor}

[bumpversion:file:VERSION]
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,20 @@ URIs like `kolibri-channel://`, `x-kolibri-dispatch://` and converts
them into kolibri-gnome arguments. Starts kolibri-gnome with a
specific application ID depending on the URI. This is why a launcher
process is needed instead of handling these URIs in kolibri-gnome.

#### Creating releases

Before creating a release, be sure you update [org.endlessos.Key.metainfo.xml.in.in](data/metainfo/org.endlessos.Key.metainfo.xml.in.in)
with information about the new release, and mark it as stable.

Next, use [bump2version](<https://pypi.org/project/bump2version/>). This will
create a new git tag and update the `VERSION` file in the project root:

```
bump2version minor
git push
git push --tags
```

Note that it is possible to increment either the `minor` or `major` component of
the project's version number.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.5
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project('kolibri-gnome', ['c'],
meson_version: '>= 0.56.0',
version: '0.1'
version: run_command('cat', 'VERSION').stdout().strip()
)

package_string = '@0@-@1@'.format(meson.project_name(), meson.project_version())
Expand Down

0 comments on commit 4af319d

Please sign in to comment.