PowerToys/.pipelines/versionSetting.ps1

61 lines
2.7 KiB
PowerShell
Raw Normal View History

Add a new YAML release pipeline to replace the old CDPx one (#15039) * lets move unneeded stuff out * adding in direct installer yml * forcing internal * Create release.yml * Update release.yml * Try to use the right feed, scrub * What if we don't do package ES... * Update release.yml * Update release.yml * Update release.yml for Azure Pipelines * Update release.yml * Update release.yml * seeing where we are in the world * adjustment * fixed a copy/paste * think we're in root, having a dir command just to verify * start copying over core files * adding in tools + setup * fixing telem * ci: fix could not lock config file flakiness * forcing root dir * attempting to copy files again * adding notes * lets try this again * trying a quicker way to figure out root * maybe it is the slash not being there looking at docs deeper * playing with slashes * signing * tewak * fixing file path for signing. suprise, app driver and PT have different paths :) * getting my sign on * tweaking json * Adjusting files and getting output from build * fixing yml copy and paste oops * fixing spacing ... * getting bootstrapper added * moving file and seeing if we can't get this pipeline goodness working * trying my next oops at powershell ... * shift in version location i bet this will fail, doing a parallel build to verify * trying again for powershell passing in arg * Dustin showed me the error * forcing as string * fdsfasd * forcing as string * getting sad panda * trying to force array * lets try this on single line .... * i made a major oops * Sync'ing naming, adding in signing for msi & boot * breaking up signing into smaller bits * grr, not everything committed * Added a lot of comments * fixing installer signing path * fixing paths * seeing if this fixes some of the signing quirks * removing 3rd party double, removing the pipeline call * centeralizing again * more consolidation * Going a bit more wide * going very wide * seeing if i can't do a dual but more targetted list * think having leading slash caused a failure * looks like the esrp does not verify paths don't exist * fixing 3rd party * reseting old stuff so old pipeline still works * resetting version setting * [PR INTO CRUTKAS BR] Fix the localization pipeline (#15026) * Fix localization This commit makes a few changes: 1. It introduces a couple scripts for moving localization files around based on Touchdown's output shape. They are well-documented. 2. It rewrites portions of the RESX->RC converter to avoid resgen and handle the new touchdown language types. * I forgot the cardinal rule of using YAML: Don't * Fix duplicate keys in Keyboard Editor! * Up the timeout * Update the language list in the wxs * Use IsPipeline * Special case SvgPreviewHandler >:{ * Push this down to Clint's branch: fix the publish profile * Reinstate the call to publish.cmd * Document it * build the publishing rules * Remove the GitSubmodules hack * Restore CDPx move_uwp_resources * Don't need this any more! spelling. * adding spelling * sorting alphabetical * fix spelling * shifint to new dll naming * Move GcodePreviewHandler's Resources to follow the preferred C# format * Revert "Move GcodePreviewHandler's Resources to follow the preferred C# format" This reverts commit daf4c7ef3a87509b769be7bd0ad035074d50c4ea. * remove SVG workaround - requires #15054! * cleaning up commented code dustin said i could delete :) * fixing tab vs space * Update release.yml Fixing Dustin comments Co-authored-by: Clint Rutkas <crutkas@microsoft.com> Co-authored-by: Dustin Howett <duhowett@microsoft.com> Co-authored-by: Jaime Bernardo <jaime@janeasystems.com> Co-authored-by: Dustin L. Howett <dustin@howett.net>
2021-12-18 02:15:31 +00:00
[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);
# Set PowerRenameContextMenu package version in AppManifest.xml
$powerRenameContextMenuAppManifestWriteFileLocation = $PSScriptRoot + '/../src/modules/powerrename/PowerRenameContextMenu/AppxManifest.xml';
$powerRenameContextMenuAppManifestReadFileLocation = $powerRenameContextMenuAppManifestWriteFileLocation;
[XML]$powerRenameContextMenuAppManifest = Get-Content $powerRenameContextMenuAppManifestReadFileLocation
$powerRenameContextMenuAppManifest.Package.Identity.Version = $versionNumber + '.0'
Write-Host "PowerRenameContextMenu version" $powerRenameContextMenuAppManifest.Package.Identity.Version
$powerRenameContextMenuAppManifest.Save($powerRenameContextMenuAppManifestWriteFileLocation);
# Set ImageResizerContextMenu package version in AppManifest.xml
$imageResizerContextMenuAppManifestWriteFileLocation = $PSScriptRoot + '/../src/modules/imageresizer/ImageResizerContextMenu/AppxManifest.xml';
$imageResizerContextMenuAppManifestReadFileLocation = $imageResizerContextMenuAppManifestWriteFileLocation;
[XML]$imageResizerContextMenuAppManifest = Get-Content $imageResizerContextMenuAppManifestReadFileLocation
$imageResizerContextMenuAppManifest.Package.Identity.Version = $versionNumber + '.0'
Write-Host "ImageResizerContextMenu version" $imageResizerContextMenuAppManifest.Package.Identity.Version
$imageResizerContextMenuAppManifest.Save($imageResizerContextMenuAppManifestWriteFileLocation);