Skip to content

Commit 391506b

Browse files
authored
Update pipeline definition (#20)
1 parent ffe6040 commit 391506b

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

azure-pipelines.yml

+17-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,14 @@ stages:
5959
secureFile: 'WinQuickLook.pfx'
6060

6161
- powershell: 'echo "##vso[task.setvariable variable=ApplicationVersion]$($env:Build_SourceBranchName.Substring(1))"'
62-
displayName: 'Set ApplicationVersion'
62+
63+
- powershell: |
64+
[Reflection.Assembly]::LoadWithPartialName("System.Xml.Linq")
65+
$path = "WinQuickLook.Package/package.appxmanifest"
66+
$doc = [System.Xml.Linq.XDocument]::Load($path)
67+
$xName = [System.Xml.Linq.XName]"{http://schemas.microsoft.com/appx/manifest/foundation/windows10}Identity"
68+
$doc.Root.Element($xName).Attribute("Version").Value = "$(ApplicationVersion).0";
69+
$doc.Save($path)
6370
6471
- task: UseDotNet@2
6572
inputs:
@@ -81,7 +88,15 @@ stages:
8188
inputs:
8289
solution: '**/*.sln'
8390
configuration: $(BuildConfiguration)
84-
msbuildArguments: /p:Version="$(ApplicationVersion)" /p:UapAppxPackageBuildMode=CI /p:AppxBundlePlatforms="$(BundlePlatforms)" /p:AppxPackageDir="$(Build.SourcesDirectory)/packed" /p:AppxBundle=Always /p:AppxPackageSigningEnabled=true /p:PackageCertificateThumbprint="" /p:PackageCertificateKeyFile="$(signingCert.secureFilePath)" /p:PackageCertificatePassword="$(PfxPassword)"
91+
msbuildArguments: '/p:Version="$(ApplicationVersion)"
92+
/p:UapAppxPackageBuildMode=CI
93+
/p:AppxBundlePlatforms="$(BundlePlatforms)"
94+
/p:AppxPackageDir="$(Build.SourcesDirectory)/packed"
95+
/p:AppxBundle=Always
96+
/p:AppxPackageSigningEnabled=true
97+
/p:PackageCertificateThumbprint=""
98+
/p:PackageCertificateKeyFile="$(signingCert.secureFilePath)"
99+
/p:PackageCertificatePassword="$(PfxPassword)"'
85100

86101
- publish: packed
87102
artifact: msix

0 commit comments

Comments
 (0)