We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 650f8bc commit 303b8ddCopy full SHA for 303b8dd
tools/version-helper.ps1
@@ -0,0 +1,22 @@
1
+# This file returns the version information to internal ES systems.
2
+
3
+param (
4
+ [ValidateSet("Major", "Minor", "Patch")]
5
+ [Parameter(Mandatory=$true)]
6
+ [string]$Version = ""
7
+)
8
9
+Set-StrictMode -Version 'Latest'
10
+$ErrorActionPreference = 'Stop'
11
12
+# Important paths.
13
+$RootDir = Split-Path $PSScriptRoot -Parent
14
+. $RootDir\tools\common.ps1
15
16
+$XdpVersion = Get-XdpBuildVersion
17
18
+switch ($Version) {
19
+ "Major" { return $XdpVersion.Major }
20
+ "Minor" { return $XdpVersion.Minor }
21
+ "Patch" { return $XdpVersion.Patch }
22
+}
0 commit comments