Skip to content

Commit

Permalink
Improve version name
Browse files Browse the repository at this point in the history
Update base version from 0.6.0 to 0.7-dev.

The idea is that when we're ready to release 0.7, we'll create a 0.7
branch. We'll then update the version to "0.7" on that branch, and
"0.8-dev" on master.

Append the short commit hash in development mode (as before)

Append the date when making a snapshot using flatpak, to help keep track
of versions when using the weekly flatpak. Tested the flatpak by running
the GHA workflow on my fork.
  • Loading branch information
SqAtx authored and diegogangl committed Sep 2, 2024
1 parent 8129230 commit a34e8db
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
15 changes: 10 additions & 5 deletions GTG/core/meson.build
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# Append short commit hash and put it in
# info.py when using development profile.
# Use git rev-parse --short HEAD if available.

git = find_program('git', required : false, disabler : true)

if git.found() and get_option('profile') == 'development'
version = meson.project_version() + '-' + run_command(
base_version = meson.project_version()
commit = run_command(
['git', 'rev-parse', '--short', 'HEAD'],
check: true
).stdout().strip()
version = base_version + '-' + commit
elif get_option('profile') == 'flatpak_snapshot'
base_version = meson.project_version()
date = run_command(
['date', '--utc', '+%Y%m%d'],
check: true
).stdout().strip()
version = base_version + '-' + date
else
version = meson.project_version()
endif
Expand Down
2 changes: 1 addition & 1 deletion build-aux/org.gnome.GTG.Devel.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
{
"name": "gtg",
"config-opts" : [
"-Dprofile=development"
"-Dprofile=flatpak_snapshot"
],
"buildsystem": "meson",
"sources": [{
Expand Down
5 changes: 5 additions & 0 deletions data/org.gnome.GTG.appdata.xml.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
<update_contact>[email protected]</update_contact>

<releases>
<!-- Snapshot version is shown as the version of the weekly flatpak -->
<!-- It needs a timestamp or date attribute, otherwise flatpak-builder ignores it -->
<!-- So we set the date attribute, to any day after the last stable release -->
<release version="0.7-dev" date="2022-03-03" type="snapshot"/>

<release version="0.6" date="2022-03-02" type="stable">
<url>https://fortintam.com/blog/gtg-0-6-released</url>
</release>
Expand Down
4 changes: 2 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('gtg',
version: '0.6.0',
version: '0.7-dev',
meson_version: '>= 0.51.0'
)

Expand All @@ -25,7 +25,7 @@ pythondir = python3.get_path('purelib')
rdnn_name = 'org.gnome.GTG'
application_id = rdnn_name

if get_option('profile') == 'development'
if get_option('profile') == 'development' or get_option('profile') == 'flatpak_snapshot'
application_id = rdnn_name + '.Devel'
endif

Expand Down
3 changes: 2 additions & 1 deletion meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ option(
type: 'combo',
choices: [
'default',
'development'
'development',
'flatpak_snapshot'
],
value: 'default',
description: 'Changes App ID'
Expand Down

0 comments on commit a34e8db

Please sign in to comment.