diff options
author | Peter Powell <petpow@saberuk.com> | 2016-09-02 19:43:53 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-09-02 22:13:22 +0200 |
commit | b8d85c62517da91cf49428a419eca10cf82682f2 (patch) | |
tree | a3333756ed759aa1bed0b1362607f422cfe47f73 /make | |
parent | 458ea2029cf36e9e8d3c7b7d0176e365234c018a (diff) |
Update stuff for the new versioning system.
Diffstat (limited to 'make')
-rw-r--r-- | make/common.pm | 15 | ||||
-rw-r--r-- | make/template/config.h | 3 | ||||
-rw-r--r-- | make/template/inspircd | 2 | ||||
-rw-r--r-- | make/template/inspircd-genssl.1 | 2 | ||||
-rw-r--r-- | make/template/inspircd.1 | 2 |
5 files changed, 14 insertions, 10 deletions
diff --git a/make/common.pm b/make/common.pm index ea4c2a50c..53ee3f778 100644 --- a/make/common.pm +++ b/make/common.pm @@ -50,7 +50,7 @@ sub get_version { # Attempt to retrieve version information from src/version.sh chomp(my $vf = `sh src/version.sh 2>/dev/null`); - if ($vf =~ /^InspIRCd-([0-9]+)\.([0-9]+)\.([0-9]+)(?:\+(\w+))?$/) { + if ($vf =~ /^InspIRCd-([0-9]+)\.([0-9]+)\.([0-9]+)(?:-(\w+))?$/) { %version = ( MAJOR => $1, MINOR => $2, PATCH => $3, LABEL => $4 ); } @@ -63,10 +63,6 @@ sub get_version { $version{LABEL} = $4 if defined $4; } - # The user is using a stable release which does not have - # a label attached. - $version{LABEL} //= 'release'; - # If any of these fields are missing then the user has deleted the # version file and is not running from Git. Fill in the fields with # dummy data so we don't get into trouble with undef values later. @@ -74,6 +70,15 @@ sub get_version { $version{MINOR} //= '0'; $version{PATCH} //= '0'; + # If there is no label then the user is using a stable release which + # does not have a label attached. + if (defined $version{LABEL}) { + $version{FULL} = "$version{MAJOR}.$version{MINOR}.$version{PATCH}-$version{LABEL}" + } else { + $version{LABEL} = 'release'; + $version{FULL} = "$version{MAJOR}.$version{MINOR}.$version{PATCH}" + } + return %version; } diff --git a/make/template/config.h b/make/template/config.h index 513c550f5..660678b38 100644 --- a/make/template/config.h +++ b/make/template/config.h @@ -20,8 +20,7 @@ #pragma once #define INSPIRCD_BRANCH "InspIRCd-@VERSION_MAJOR@.@VERSION_MINOR@" -#define INSPIRCD_VERSION "InspIRCd-@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@" -#define INSPIRCD_REVISION "@VERSION_LABEL@" +#define INSPIRCD_VERSION "InspIRCd-@VERSION_FULL@" #define INSPIRCD_SYSTEM "@SYSTEM_NAME_VERSION@" #define INSPIRCD_CONFIG_PATH "@CONFIG_DIR@" diff --git a/make/template/inspircd b/make/template/inspircd index cb2d2902d..949f85cee 100644 --- a/make/template/inspircd +++ b/make/template/inspircd @@ -55,7 +55,7 @@ my $runpath = "@BASE_DIR@"; my $datadir = "@DATA_DIR@"; my $valgrindlogpath = "$basepath/valgrindlogs"; my $executable = "inspircd"; -my $version = "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@+@VERSION_LABEL@"; +my $version = "@VERSION_FULL@"; my $uid = "@UID@"; if (!("--runasroot" ~~ @ARGV) && ($< == 0 || $> == 0)) { diff --git a/make/template/inspircd-genssl.1 b/make/template/inspircd-genssl.1 index 4be5f394c..d43a3b4e8 100644 --- a/make/template/inspircd-genssl.1 +++ b/make/template/inspircd-genssl.1 @@ -17,7 +17,7 @@ .\" -.TH "InspIRCd" "1" "June 2014" "InspIRCd @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@+@VERSION_LABEL@" "InspIRCd Manual" +.TH "InspIRCd" "1" "June 2014" "InspIRCd @VERSION_FULL@" "InspIRCd Manual" .SH "NAME" \t\fBInspIRCd\fR - \fIthe\fR stable, high-performance and modular Internet Relay Chat Daemon diff --git a/make/template/inspircd.1 b/make/template/inspircd.1 index 463db5c47..eb1453d2f 100644 --- a/make/template/inspircd.1 +++ b/make/template/inspircd.1 @@ -17,7 +17,7 @@ .\" -.TH "InspIRCd" "1" "June 2014" "InspIRCd @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@+@VERSION_LABEL@" "InspIRCd Manual" +.TH "InspIRCd" "1" "June 2014" "InspIRCd @VERSION_FULL@" "InspIRCd Manual" .SH "NAME" \t\fBInspIRCd\fR - \fIthe\fR stable, high-performance and modular Internet Relay Chat Daemon |