Skip to content

Commit af613c6

Browse files
committed
Allow specifying config information through env vars
1 parent fa86f7a commit af613c6

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

scripts/configure.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,14 @@ public IdeConfigurationTool(string monoDevelopPath)
138138
CompatVersion = SystemUtil.Grep(versionTxt, "CompatVersion=(.*)");
139139
SourceUrl = SystemUtil.Grep(versionTxt, "SourceUrl=(.*)", true);
140140

141+
var customSource = Environment.GetEnvironmentVariable ("MONODEVELOP_UPDATEINFO_SOURCE_URL");
142+
if (!string.IsNullOrEmpty (customSource))
143+
SourceUrl = customSource;
144+
145+
var customLabel = Environment.GetEnvironmentVariable ("MONODEVELOP_UPDATEINFO_LABEL");
146+
if (!string.IsNullOrEmpty (customLabel))
147+
ProductVersionText = customLabel;
148+
141149
Version ver = new Version(Version);
142150
int vbuild = ver.Build != -1 ? ver.Build : 0;
143151
var cd = GetVersionCommitDistance(MonoDevelopPath);
@@ -157,7 +165,7 @@ public void GenerateUpdateInfo (string platformConfigFile, string targetDir)
157165

158166
if (pinfo.AppId != null) {
159167
var content = pinfo.AppId + " " + ReleaseId;
160-
if (SourceUrl != null)
168+
if (!string.IsNullOrEmpty (SourceUrl))
161169
content += "\nsource-url:" + SourceUrl;
162170
File.WriteAllText (Path.Combine (targetDir, "updateinfo"), content);
163171
}

0 commit comments

Comments
 (0)