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

Better copyright year detection

parent 9901b6c5
No related branches found
No related tags found
No related merge requests found
Pipeline #
#!/usr/bin/sh
stat -c '%y' `find . -type f | xargs` | sort -r | head -n1 | cut -d "-" -f1 | tr -d '\n'
......@@ -20,6 +20,7 @@
#include <gtk/gtk.h>
#include "config.h"
#include "rugby-app-window.h"
static void
......@@ -39,10 +40,7 @@ about_activated (GSimpleAction *simple,
GtkWindow *window = gtk_application_get_active_window (app);
const gchar *authors[] = { "Bruce Cowan", NULL };
g_autoptr (GDateTime) date = g_date_time_new_now_local ();
gint year = g_date_time_get_year (date);
g_autofree gchar *copyright = g_strdup_printf ("Copyright © 2012–%d Bruce Cowan",
year);
const gchar *copyright = "Copyright © 2012–" COPYRIGHT_YEAR " Bruce Cowan";
gtk_show_about_dialog (window,
"logo-icon-name", "face-wink",
......
......@@ -5,6 +5,9 @@ conf.set('TRY_POINTS', get_option('try_points'))
conf.set('UTRY_POINTS', get_option('utry_points'))
conf.set('KICK_POINTS', get_option('kick_points'))
year = run_command('find_year.sh').stdout()
conf.set_quoted('COPYRIGHT_YEAR', year)
config_h = configure_file(configuration: conf, output: 'config.h')
sources = files(
......
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