From b6149ff5969684b2291d30ac00fc7830db186733 Mon Sep 17 00:00:00 2001 From: Greg Munn Date: Tue, 16 May 2017 14:49:43 -0400 Subject: [Build] Introduce new `is-preview` command to configure.sh --- scripts/configure.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'scripts') 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 : Generates the updateinfo file"); Console.WriteLine("\t\tin the provided path"); Console.WriteLine("\tgen-buildinfo : 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)) -- cgit v1.2.3