summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-04-14 17:33:20 -0400
committerDaniel Friesel <derf@finalrewind.org>2019-04-14 17:34:30 -0400
commite1e07d5811360bec59d2fb63d8cedb96d4091301 (patch)
treee4d2c9d618b99ee74133ab8ec523ad6907a862dc
parent17e8b659571d18f3df4de597ad5674b2eed1ae33 (diff)
Set version via config
-rw-r--r--examples/travelynx.conf1
-rwxr-xr-xlib/Travelynx.pm2
-rw-r--r--lib/Travelynx/Controller/Static.pm2
3 files changed, 2 insertions, 3 deletions
diff --git a/examples/travelynx.conf b/examples/travelynx.conf
index ae61f7b..6e8c4e1 100644
--- a/examples/travelynx.conf
+++ b/examples/travelynx.conf
@@ -20,4 +20,5 @@
secrets => [
die("Changeme!"),
],
+ version => qx{git describe --dirty} // 'experimental',
};
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index 8da796d..01c90a0 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -15,8 +15,6 @@ use Travel::Status::DE::IRIS;
use Travel::Status::DE::IRIS::Stations;
use Travelynx::Helper::Sendmail;
-our $VERSION = qx{git describe --dirty} || 'experimental';
-
sub check_password {
my ( $password, $hash ) = @_;
diff --git a/lib/Travelynx/Controller/Static.pm b/lib/Travelynx/Controller/Static.pm
index aa3428e..0144d83 100644
--- a/lib/Travelynx/Controller/Static.pm
+++ b/lib/Travelynx/Controller/Static.pm
@@ -6,7 +6,7 @@ my $travelynx_version = qx{git describe --dirty} || 'experimental';
sub about {
my ($self) = @_;
- $self->render( 'about', version => $travelynx_version );
+ $self->render( 'about', version => $self->app->config->{version} // 'UNKNOWN' );
}
sub imprint {