mirror of
https://github.com/actions/node-versions.git
synced 2025-04-21 10:29:20 +08:00
fix zip parameters
This commit is contained in:
parent
10e3a2416f
commit
7e2965c731
@ -25,7 +25,7 @@ jobs:
|
||||
|
||||
- task: ExtractFiles@1
|
||||
inputs:
|
||||
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/node-$(Version)-$(Platform)-$(Architecture).zip'
|
||||
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/node-$(Version)-$(Platform)-$(Architecture).*'
|
||||
destinationFolder: $(Build.BinariesDirectory)
|
||||
cleanDestinationFolder: false
|
||||
|
||||
|
@ -23,7 +23,8 @@ function Create-TarArchive {
|
||||
[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,
|
||||
[Parameter(Mandatory=$true)]
|
||||
[String]$ArchivePath,
|
||||
[String]$ArchiveType = "zip"
|
||||
[String]$ArchiveType = "zip",
|
||||
[String]$CompressionLevel = 5
|
||||
)
|
||||
|
||||
$ArchiveTypeArgument = "-t${ArchiveType}"
|
||||
|
||||
$CompressionLevelArgument = "-mx=${CompressionLevel}"
|
||||
|
||||
Push-Location $SourceFolder
|
||||
7z a $ArchiveTypeArgument $ArchivePath *.* -r
|
||||
Write-Debug "7z a $ArchiveTypeArgument $CompressionLevelArgument $ArchivePath @$SourceFolder"
|
||||
7z a $ArchiveTypeArgument $CompressionLevelArgument $ArchivePath @$SourceFolder
|
||||
Pop-Location
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user