Switch packages for Ubuntu & macOS to use tar.gz format instead of zip #6
@@ -25,7 +25,7 @@ jobs:
|
|||||||
|
|
||||||
- task: ExtractFiles@1
|
- task: ExtractFiles@1
|
||||||
inputs:
|
inputs:
|
||||||
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/node-$(Version)-$(Platform)-$(Architecture).zip'
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/node-$(Version)-$(Platform)-$(Architecture).*'
|
||||||
destinationFolder: $(Build.BinariesDirectory)
|
destinationFolder: $(Build.BinariesDirectory)
|
||||||
cleanDestinationFolder: false
|
cleanDestinationFolder: false
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ function Create-TarArchive {
|
|||||||
[string]$CompressionType = "gz"
|
[string]$CompressionType = "gz"
|
||||||
)
|
)
|
||||||
|
|
||||||
$CompressionArgument = If ([string]::IsNullOrWhiteSpace($CompressionType)) { "" } else { "--${CompressionType}" }
|
$CompressionTypeArgument = If ([string]::IsNullOrWhiteSpace($CompressionType)) { "" } else { "--${CompressionType}" }
|
||||||
|
|
||||||
tar -c $CompressionArgument -f $ArchivePath "$SourceFolder/*.*"
|
Write-Debug "tar -c $CompressionTypeArgument -f $ArchivePath $SourceFolder"
|
||||||
|
tar -c $CompressionTypeArgument -f $ArchivePath $SourceFolder
|
||||||
}
|
}
|
||||||
@@ -20,12 +20,15 @@ function Create-SevenZipArchive {
|
|||||||
[String]$SourceFolder,
|
[String]$SourceFolder,
|
||||||
[Parameter(Mandatory=$true)]
|
[Parameter(Mandatory=$true)]
|
||||||
[String]$ArchivePath,
|
[String]$ArchivePath,
|
||||||
[String]$ArchiveType = "zip"
|
[String]$ArchiveType = "zip",
|
||||||
|
[String]$CompressionLevel = 5
|
||||||
)
|
)
|
||||||
|
|
||||||
$ArchiveTypeArgument = "-t${ArchiveType}"
|
$ArchiveTypeArgument = "-t${ArchiveType}"
|
||||||
|
$CompressionLevelArgument = "-mx=${CompressionLevel}"
|
||||||
|
|
||||||
Push-Location $SourceFolder
|
Push-Location $SourceFolder
|
||||||
7z a $ArchiveTypeArgument $ArchivePath *.* -r
|
Write-Debug "7z a $ArchiveTypeArgument $CompressionLevelArgument $ArchivePath @$SourceFolder"
|
||||||
|
7z a $ArchiveTypeArgument $CompressionLevelArgument $ArchivePath @$SourceFolder
|
||||||
Pop-Location
|
Pop-Location
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user