aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp David <pd@3b.pm>2022-03-15 09:04:43 +0100
committerPhilipp David <pd@3b.pm>2022-03-15 09:04:43 +0100
commita268ac71410c228d0d76cd2a9cf9a6057b1f9085 (patch)
tree1432ab4529d3046085146b1c634ed2d768c0e7bd
parentaedb513c9ee46a50c9208637dc741b322f418cf5 (diff)
downloadPrismLauncher-a268ac71410c228d0d76cd2a9cf9a6057b1f9085.tar.gz
PrismLauncher-a268ac71410c228d0d76cd2a9cf9a6057b1f9085.tar.bz2
PrismLauncher-a268ac71410c228d0d76cd2a9cf9a6057b1f9085.zip
Add GITDIR-NOTFOUND check
This adds a check for a GIT_REFSPEC value of "GITDIR-NOTFOUND" and sets the VERSION_CHANNEL to stable in that case. Without this change, "GITDIR-N" is appended to the version string when building from a source archive instead of a git checkout.
-rw-r--r--buildconfig/BuildConfig.cpp.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in
index 6524fb5d..4625b1bf 100644
--- a/buildconfig/BuildConfig.cpp.in
+++ b/buildconfig/BuildConfig.cpp.in
@@ -28,7 +28,11 @@ Config::Config()
GIT_COMMIT = "@Launcher_GIT_COMMIT@";
GIT_REFSPEC = "@Launcher_GIT_REFSPEC@";
- if(GIT_REFSPEC.startsWith("refs/heads/"))
+ if (GIT_REFSPEC == QStringLiteral("GITDIR-NOTFOUND"))
+ {
+ VERSION_CHANNEL = QStringLiteral("stable");
+ }
+ else if(GIT_REFSPEC.startsWith("refs/heads/"))
{
VERSION_CHANNEL = GIT_REFSPEC;
VERSION_CHANNEL.remove("refs/heads/");