Skip to content
Snippets Groups Projects
Commit 918670b4 authored by Bruce Cowan's avatar Bruce Cowan
Browse files

Simplify copyright year and add VCS version to dialogue

parent 91138ff7
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
# SPDX-FileCopyrightText: 2018-2020 Bruce Cowan <bruce@bcowan.me.uk>
#
# SPDX-License-Identifier: CC0-1.0
git log -1 --format=%cd --date=format:%Y
...@@ -35,6 +35,7 @@ about_activated (GSimpleAction *simple, ...@@ -35,6 +35,7 @@ about_activated (GSimpleAction *simple,
"license-type", GTK_LICENSE_LGPL_3_0, "license-type", GTK_LICENSE_LGPL_3_0,
"authors", authors, "authors", authors,
"comments", "Rugby scores possiblities program", "comments", "Rugby scores possiblities program",
"version", PACKAGE_VERSION,
NULL); NULL);
} }
......
# SPDX-FileCopyrightText: 2016-2018 Bruce Cowan <bruce@bcowan.me.uk> # SPDX-FileCopyrightText: 2016-2020 Bruce Cowan <bruce@bcowan.me.uk>
# #
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
...@@ -9,8 +9,17 @@ conf.set('TRY_POINTS', get_option('try_points')) ...@@ -9,8 +9,17 @@ conf.set('TRY_POINTS', get_option('try_points'))
conf.set('UTRY_POINTS', get_option('utry_points')) conf.set('UTRY_POINTS', get_option('utry_points'))
conf.set('KICK_POINTS', get_option('kick_points')) conf.set('KICK_POINTS', get_option('kick_points'))
year = run_command('find_year.sh').stdout().strip() VCS_TAG = ''
conf.set_quoted('COPYRIGHT_YEAR', year) COPYRIGHT_YEAR = '?'
git = find_program('git', required: false)
if git.found()
VCS_TAG = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
COPYRIGHT_YEAR = run_command('git', 'log', '-1', '--format=%cd', '--date=format:%Y').stdout().strip()
endif
conf.set_quoted('PACKAGE_VERSION', VCS_TAG)
conf.set_quoted('COPYRIGHT_YEAR', COPYRIGHT_YEAR)
config_h = configure_file(configuration: conf, output: 'config.h') config_h = configure_file(configuration: conf, output: 'config.h')
......
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