Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build/pipelines/templates-v2/job-merge-msix-into-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ jobs:
ValidateSignature: true
Verbosity: 'Verbose'

- pwsh: |-
tar -c -v --format=zip -f "$(JobOutputDirectory)/GroupPolicyTemplates_$(XES_APPXMANIFESTVERSION).zip" -C "$(Build.SourcesDirectory)/policies" *
displayName: Package GPO Templates

- ${{ parameters.afterBuildSteps }}

- ${{ if eq(parameters.publishArtifacts, true) }}:
Expand Down
21 changes: 16 additions & 5 deletions tools/ReleaseEngineering/Draft-TerminalReleases.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Enum AssetType {
Unknown
ApplicationBundle
PreinstallKit
GroupPolicy
Zip
}

Expand Down Expand Up @@ -83,14 +84,17 @@ Class Asset {
$local:bundlePath = Join-Path $local:directory $local:bundleName
$this.Type = [AssetType]::PreinstallKit
$this.Architecture = "all"
} ElseIf (".zip" -eq $local:ext -and $local:filename -like 'GroupPolicy*') {
$this.Type = [AssetType]::GroupPolicy
$this.Architecture = "all"
} ElseIf (".zip" -eq $local:ext) {
$this.Type = [AssetType]::Zip
} ElseIf (".msixbundle" -eq $local:ext) {
$this.Type = [AssetType]::ApplicationBundle
$this.Architecture = "all"
}

If ($this.Type -Ne [AssetType]::Zip) {
If ($this.Type -In ([AssetType]::ApplicationBundle, [AssetType]::PreinstallKit)) {
Write-Verbose "Cracking bundle $($local:bundlePath)"
$local:firstMsixName = & $script:tar -t -f $local:bundlePath |
Select-String 'Cascadia.*\.msix' |
Expand All @@ -105,8 +109,10 @@ Class Asset {
$local:Manifest = [xml](Get-Content (Join-Path $local:directory AppxManifest.xml))
$this.ParseManifest($local:Manifest)
} Else {
& $script:tar -x -f $this.Path -C $local:directory --strip-components=1 '*/wt.exe'
$this.ExpandedVersion = (Get-Item (Join-Path $local:directory wt.exe)).VersionInfo.ProductVersion
If ($this.Type -Ne [AssetType]::GroupPolicy) {
& $script:tar -x -f $this.Path -C $local:directory --strip-components=1 '*/wt.exe'
$this.ExpandedVersion = (Get-Item (Join-Path $local:directory wt.exe)).VersionInfo.ProductVersion
}

# Zip files just encode everything in their filename. Not great, but workable.
$this.ParseFilename($local:filename)
Expand All @@ -133,7 +139,9 @@ Class Asset {
$parts = [IO.Path]::GetFileNameWithoutExtension($filename).Split("_")
$this.Name = $parts[0]
$this.Version = $parts[1]
$this.Architecture = $parts[2]
If ($parts.Length -Ge 3) {
$this.Architecture = $parts[2]
}
}

[string]IdealFilename() {
Expand All @@ -149,6 +157,9 @@ Class Asset {
Zip {
"{0}_{1}_{2}.zip" -f ($this.Name, $this.Version, $this.Architecture)
}
GroupPolicy {
"{0}_{1}.zip" -f ($this.Name, $this.Version)
}
Default {
Throw "Unknown type $($_.Type)"
}
Expand All @@ -174,7 +185,7 @@ class Release {

Release([Asset[]]$a) {
$this.Assets = $a
$this.Branding = $a[0].Branding
$this.Branding = $a | Where-Object Branding -Ne ([Branding]::Unknown) | Select -Unique -First 1 -Expand Branding
$this.Name = Switch($this.Branding) {
Release { "Windows Terminal" }
Preview { "Windows Terminal Preview" }
Expand Down