Skip to content

Commit cec3ebf

Browse files
committed
Use tar to compress instead of separatly using gzip
1 parent 631d0e1 commit cec3ebf

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

build.ps1

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -689,20 +689,14 @@ if ($packageType -eq 'msixbundle') {
689689
$architecture
690690
}
691691

692-
$packageName = "DSC-$productVersion-$productArchitecture.tar"
692+
Write-Verbose -Verbose "Creating tar.gz file"
693+
$packageName = "DSC-$productVersion-$productArchitecture.tar.gz"
693694
$tarFile = Join-Path $PSScriptRoot 'bin' $packageName
694-
tar cvf $tarFile -C $tgzTarget .
695+
tar -czvf $tarFile -C $tgzTarget .
695696
if ($LASTEXITCODE -ne 0) {
696-
throw "Failed to create tar file"
697+
throw "Failed to create tar.gz file"
697698
}
698-
Write-Host -ForegroundColor Green "`nTar file is created at $tarFile"
699-
700-
$gzFile = "$tarFile.gz"
701-
gzip -c $tarFile > $gzFile
702-
if ($LASTEXITCODE -ne 0) {
703-
throw "Failed to create gz file"
704-
}
705-
Write-Host -ForegroundColor Green "`nGz file is created at $gzFile"
699+
Write-Host -ForegroundColor Green "`ntar.gz file is created at $tarFile"
706700
}
707701

708702
$env:RUST_BACKTRACE=1

0 commit comments

Comments
 (0)