Skip to content
Snippets Groups Projects
Verified Commit 48137908 authored by Bruce Cowan's avatar Bruce Cowan :airplane:
Browse files

Better version handling

parent 7fae22b2
No related branches found
No related tags found
No related merge requests found
......@@ -27,3 +27,5 @@ modules:
sources:
- type: git
url: https://git.fossgalaxy.com/SuborbitalPigeon/rugby.git
config_opts:
- "-Ddevelopment=true"
......@@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later
project('rugby', 'c',
version: '0.3.0',
version: '0.4.alpha',
license:'GPLv3+',
meson_version: '>= 0.57.0',
default_options: [
......@@ -24,12 +24,24 @@ libadwaita_dep = dependency('libadwaita-1')
conf = configuration_data()
conf.set_quoted('VERSION','@VCS_TAG@')
devel = get_option('development')
conf.set10('DEVELOPMENT', devel)
if devel
conf.set_quoted('VERSION', '@0@-@VCS_TAG@'.format(meson.project_version()))
else
conf.set_quoted('VERSION', meson.project_version())
endif
config_h = vcs_tag(
input: configure_file(
output: 'config.h.in',
configuration: conf
),
output: 'config.h',
command: ['git', 'rev-parse', '--short', 'HEAD'],
fallback: devel ? 'devel' : '',
)
cflags = ['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_66',
......
# SPDX-FileCopyrightText: 2022 Bruce Cowan <bruce@bcowan.me.uk>
#
# SPDX-License-Identifier: CC0-1.0
option('development', type: 'boolean', value: true, description: 'Is this a development build?')
......@@ -17,6 +17,9 @@ on_activate ( GApplication *app,
if (!window)
window = GTK_WIDGET (rugby_app_window_new (GTK_APPLICATION (app)));
if (DEVELOPMENT)
gtk_widget_add_css_class (GTK_WIDGET (window), "devel");
gtk_window_present (GTK_WINDOW (window));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment