Skip to content

Commit 4dad19c

Browse files
authored
Fixing build folder path for signing (#204)
* Fixing build folder path for signing * Fixing path again * fix error
1 parent e2039c8 commit 4dad19c

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

build/scripts/Build.ps1

+18-16
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,24 @@ $ErrorActionPreference = "Stop"
5656
. (Join-Path $env:Build_RootDirectory "build\scripts\CertSignAndInstall.ps1")
5757

5858
Try {
59-
$msbuildArgs = @(
60-
($solutionPath),
61-
("/p:platform="+$platform),
62-
("/p:configuration="+$configuration),
63-
("/restore"),
64-
("/binaryLogger:GitHubExtension.$platform.$configuration.binlog"),
65-
("/p:AppxPackageOutput=$appxPackageDir\GitHubExtension_$configuration" + "_$Version" + "_$platform.msix"),
66-
("/p:AppxPackageSigningEnabled=false"),
67-
("/p:GenerateAppxPackageOnBuild=true")
68-
)
69-
70-
& $msbuildPath $msbuildArgs
71-
if (-not($IsAzurePipelineBuild) -And $isAdmin) {
72-
Invoke-SignPackage "$appxPackageDir\GitHubExtension_$configuration" + "_$Version" + "_$platform.msix"
73-
}
74-
} Catch {
59+
$appxPackageDir = (Join-Path $env:Build_RootDirectory "BuildOutput")
60+
$solutionPath = (Join-Path $env:Build_RootDirectory "GitHubExtension.sln")
61+
$msbuildArgs = @(
62+
($solutionPath),
63+
("/p:platform="+$platform),
64+
("/p:configuration="+$configuration),
65+
("/restore"),
66+
("/binaryLogger:GitHubExtension.$platform.$configuration.binlog"),
67+
("/p:AppxPackageOutput=$appxPackageDir\GitHubExtension_$configuration" + "_$Version" + "_$platform.msix"),
68+
("/p:AppxPackageSigningEnabled=false"),
69+
("/p:GenerateAppxPackageOnBuild=true")
70+
)
71+
72+
& $msbuildPath $msbuildArgs
73+
if (-not($IsAzurePipelineBuild) -And $isAdmin) {
74+
Invoke-SignPackage "$appxPackageDir\GitHubExtension_$configuration" + "_$Version" + "_$platform.msix"
75+
}
76+
} Catch {
7577
$formatString = "`n{0}`n`n{1}`n`n"
7678
$fields = $_, $_.ScriptStackTrace
7779
Write-Host ($formatString -f $fields) -ForegroundColor RED

0 commit comments

Comments
 (0)