File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -716,20 +716,21 @@ if ($packageType -eq 'msixbundle') {
716
716
$architecture
717
717
}
718
718
719
- $packageName = " DSC-$productVersion -$productArchitecture .tar"
719
+ Write-Verbose - Verbose " Creating tar.gz file"
720
+ $packageName = " DSC-$productVersion -$productArchitecture .tar.gz"
720
721
$tarFile = Join-Path $PSScriptRoot ' bin' $packageName
721
- tar cvf $tarFile - C $tgzTarget .
722
+ tar - czvf $tarFile - C $tgzTarget .
722
723
if ($LASTEXITCODE -ne 0 ) {
723
- throw " Failed to create tar file"
724
+ throw " Failed to create tar.gz file"
724
725
}
725
- Write-Host - ForegroundColor Green " `n Tar file is created at $tarFile "
726
726
727
- $gzFile = " $tarFile .gz "
728
- gzip - c $tarFile > $gzFile
729
- if ($LASTEXITCODE -ne 0 ) {
730
- throw " Failed to create gz file"
727
+ # check it's valid
728
+ $out = file $tarFile
729
+ if ($out -notmatch ' gzip compressed data ' ) {
730
+ throw " Invalid tar. gz file"
731
731
}
732
- Write-Host - ForegroundColor Green " `n Gz file is created at $gzFile "
732
+
733
+ Write-Host - ForegroundColor Green " `n tar.gz file is created at $tarFile "
733
734
}
734
735
735
736
$env: RUST_BACKTRACE = 1
You can’t perform that action at this time.
0 commit comments