From eadab13d1c8e8e13a554d1af604a9dd39fa28f2a Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Wed, 23 Sep 2020 08:10:42 -0700 Subject: [PATCH 1/5] added in version.prop update and the ps script --- src/Version.props | 5 +++-- tools/build/versionSetting.ps1 | 41 ++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 tools/build/versionSetting.ps1 diff --git a/src/Version.props b/src/Version.props index 3349cbf03f..637a7c3609 100644 --- a/src/Version.props +++ b/src/Version.props @@ -1,6 +1,7 @@ - + - 0.21.2 + 0.0.1 + Local \ No newline at end of file diff --git a/tools/build/versionSetting.ps1 b/tools/build/versionSetting.ps1 new file mode 100644 index 0000000000..f8991cc718 --- /dev/null +++ b/tools/build/versionSetting.ps1 @@ -0,0 +1,41 @@ +[CmdletBinding()] +Param( + [Parameter(Mandatory=$True,Position=1)] + [string]$versionNumber = "0.0.1", + + [Parameter(Mandatory=$True,Position=2)] + [AllowEmptyString()] + [string]$DevEnvironment = "Local" +) + +Write-Host $PSScriptRoot +$versionRegex = "(\d+)\.(\d+)\.(\d+)" + +if($versionNumber -match $versionRegEx) +{ + $buildDayOfYear = (Get-Date).DayofYear; + $buildTime = Get-Date -Format HH; + # $buildTime = Get-Date -Format HHmmss; + # $buildYear = Get-Date -Format yy; + # $revision = [string]::Format("{0}{1}{2}", $buildYear, $buildDayOfYear, $buildTime ) + + # max UInt16, 65535 + #$revision = [string]::Format("{0}{1}", $buildDayOfYear, $buildTime ) + #Write-Host "Revision" $revision + + $versionNumber = [int]::Parse($matches[1]).ToString() + "." + [int]::Parse($matches[2]).ToString() + "." + [int]::Parse($matches[3]).ToString() # + "." + $revision + Write-Host "Version Number" $versionNumber +} +else{ + throw "Build format does not match the expected pattern (buildName_w.x.y.z)" +} + +$verPropWriteFileLocation = $PSScriptRoot + '/../../src/Version.props'; +$verPropReadFileLocation = $verPropWriteFileLocation; + +[XML]$verProps = Get-Content $verPropReadFileLocation +$verProps.Project.PropertyGroup.Version = $versionNumber; +$verProps.Project.PropertyGroup.DevEnvironment = $DevEnvironment; + +Write-Host "xml" $verProps.Project.PropertyGroup.Version +$verProps.Save($verPropWriteFileLocation); \ No newline at end of file From d1348bb26aae18fb110c61c14b4980738241f9db Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Wed, 23 Sep 2020 10:17:50 -0700 Subject: [PATCH 2/5] tweaked, unsure if we want to make this dynamic for farm to change min version --- installer/PowerToysSetup/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/PowerToysSetup/Product.wxs b/installer/PowerToysSetup/Product.wxs index 8d57f38edd..142fa54533 100644 --- a/installer/PowerToysSetup/Product.wxs +++ b/installer/PowerToysSetup/Product.wxs @@ -25,7 +25,7 @@ From 47430edf9fcec87a6a26e672321d01b8ed084d9d Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Tue, 20 Oct 2020 15:57:33 -0700 Subject: [PATCH 3/5] Update Product.wxs --- installer/PowerToysSetup/Product.wxs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/PowerToysSetup/Product.wxs b/installer/PowerToysSetup/Product.wxs index 142fa54533..cddcbe03d4 100644 --- a/installer/PowerToysSetup/Product.wxs +++ b/installer/PowerToysSetup/Product.wxs @@ -25,7 +25,7 @@ @@ -983,4 +983,4 @@ - \ No newline at end of file + From a1782f31b293d120588be0e747064c45081c74fd Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Tue, 20 Oct 2020 15:58:26 -0700 Subject: [PATCH 4/5] Update Version.props --- src/Version.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Version.props b/src/Version.props index 637a7c3609..6b54dbd99a 100644 --- a/src/Version.props +++ b/src/Version.props @@ -1,7 +1,7 @@ - + 0.0.1 Local - \ No newline at end of file + From 8ecf246386c4eb9d43438fd6e425304120cb1083 Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Wed, 21 Oct 2020 12:24:06 -0700 Subject: [PATCH 5/5] Shifting to 0.0.0. 0.0.1 won't compile since Max and min would match. Suggestion of 0.0.0.1 wasn't liked since it was a different format as well. --- installer/PowerToysSetup/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/PowerToysSetup/Product.wxs b/installer/PowerToysSetup/Product.wxs index ecf368a3ca..0367c8d0c2 100644 --- a/installer/PowerToysSetup/Product.wxs +++ b/installer/PowerToysSetup/Product.wxs @@ -25,7 +25,7 @@