Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@xamarin.com>2017-02-08 21:20:20 +0300
committerLluis Sanchez <lluis@xamarin.com>2017-02-09 19:02:43 +0300
commitaf613c6c4fba5f80470bcc58ea6ad2642909644b (patch)
treeb5637893cb481e67bce442f9320f47faa3e6c342 /scripts
parentfa86f7a5203375bab8e7db400c05c5be055d171c (diff)
Allow specifying config information through env vars
Diffstat (limited to 'scripts')
-rw-r--r--scripts/configure.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/configure.cs b/scripts/configure.cs
index c34abb84e7..1701514d70 100644
--- a/scripts/configure.cs
+++ b/scripts/configure.cs
@@ -138,6 +138,14 @@ namespace MonoDevelop.Configuration
CompatVersion = SystemUtil.Grep(versionTxt, "CompatVersion=(.*)");
SourceUrl = SystemUtil.Grep(versionTxt, "SourceUrl=(.*)", true);
+ var customSource = Environment.GetEnvironmentVariable ("MONODEVELOP_UPDATEINFO_SOURCE_URL");
+ if (!string.IsNullOrEmpty (customSource))
+ SourceUrl = customSource;
+
+ var customLabel = Environment.GetEnvironmentVariable ("MONODEVELOP_UPDATEINFO_LABEL");
+ if (!string.IsNullOrEmpty (customLabel))
+ ProductVersionText = customLabel;
+
Version ver = new Version(Version);
int vbuild = ver.Build != -1 ? ver.Build : 0;
var cd = GetVersionCommitDistance(MonoDevelopPath);
@@ -157,7 +165,7 @@ namespace MonoDevelop.Configuration
if (pinfo.AppId != null) {
var content = pinfo.AppId + " " + ReleaseId;
- if (SourceUrl != null)
+ if (!string.IsNullOrEmpty (SourceUrl))
content += "\nsource-url:" + SourceUrl;
File.WriteAllText (Path.Combine (targetDir, "updateinfo"), content);
}