diff options
author | Greg Munn <greg@sgmunn.com> | 2017-05-16 21:49:43 +0300 |
---|---|---|
committer | Greg Munn <greg@sgmunn.com> | 2017-05-16 21:49:43 +0300 |
commit | b6149ff5969684b2291d30ac00fc7830db186733 (patch) | |
tree | d7d852d27fdfc8a06bdc7db0850b631ea9bc133a /scripts | |
parent | 97de56d2f4d87c62fd9aee5e0d663b82048480e1 (diff) |
[Build] Introduce new `is-preview` command to configure.sh
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/configure.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/configure.cs b/scripts/configure.cs index 1701514d70..3f04d1538f 100644 --- a/scripts/configure.cs +++ b/scripts/configure.cs @@ -58,6 +58,9 @@ namespace MonoDevelop.Configuration case "gen-buildinfo": GenerateBuildInfo(args); break; + case "is-preview": + GetIsPreview(args); + break; default: Console.WriteLine("Unknown command: " + cmd); return 1; @@ -79,6 +82,11 @@ namespace MonoDevelop.Configuration Console.WriteLine (config.ProductVersion); } + static void GetIsPreview (string[] args) + { + Console.WriteLine (config.IsPreview); + } + static void GetReleaseId (string[] args) { Console.WriteLine (config.ReleaseId); @@ -109,6 +117,7 @@ namespace MonoDevelop.Configuration Console.WriteLine("Commands:"); Console.WriteLine("\tget-version: Prints the version of this release"); Console.WriteLine("\tget-releaseid: Prints the release id"); + Console.WriteLine("\tis-preview: Prints `True` if this is a preview or `False` otherwise"); Console.WriteLine("\tgen-updateinfo <config-file> <path>: Generates the updateinfo file"); Console.WriteLine("\t\tin the provided path"); Console.WriteLine("\tgen-buildinfo <path>: Generates the buildinfo file in the provided path"); @@ -127,6 +136,7 @@ namespace MonoDevelop.Configuration public readonly string AssemblyVersion = "4.0.0.0"; public readonly string ReleaseId; public readonly PlatformInfo PlatformInfo; + public readonly bool IsPreview; public IdeConfigurationTool(string monoDevelopPath) { @@ -137,6 +147,7 @@ namespace MonoDevelop.Configuration ProductVersionText = SystemUtil.Grep(versionTxt, "Label=(.*)"); CompatVersion = SystemUtil.Grep(versionTxt, "CompatVersion=(.*)"); SourceUrl = SystemUtil.Grep(versionTxt, "SourceUrl=(.*)", true); + IsPreview = SystemUtil.Grep(versionTxt, "IsPreview=(.*)") == "true"; var customSource = Environment.GetEnvironmentVariable ("MONODEVELOP_UPDATEINFO_SOURCE_URL"); if (!string.IsNullOrEmpty (customSource)) |