File tree Expand file tree Collapse file tree 2 files changed +84
-77
lines changed Expand file tree Collapse file tree 2 files changed +84
-77
lines changed Original file line number Diff line number Diff line change @@ -689,20 +689,21 @@ 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 " `n Tar file is created at $tarFile "
699699
700- $gzFile = " $tarFile .gz "
701- gzip - c $tarFile > $gzFile
702- if ($LASTEXITCODE -ne 0 ) {
703- throw " Failed to create gz file"
700+ # check it's valid
701+ $out = file $tarFile
702+ if ($out -notmatch ' gzip compressed data ' ) {
703+ throw " Invalid tar. gz file"
704704 }
705- Write-Host - ForegroundColor Green " `n Gz file is created at $gzFile "
705+
706+ Write-Host - ForegroundColor Green " `n tar.gz file is created at $tarFile "
706707}
707708
708709$env: RUST_BACKTRACE = 1
You can’t perform that action at this time.
0 commit comments