mirror of
https://github.com/actions/node-versions.git
synced 2025-09-12 08:11:25 +08:00
Switch packages for Ubuntu & macOS to use tar.gz format instead of zip (#6)
Switch to using tar.gz format for Ubuntu and macOS systems because it is much more common on nix systems which is important in container scenarios
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
.SYNOPSIS
|
||||
Unpack *.7z file
|
||||
#>
|
||||
function Extract-7ZipArchive {
|
||||
function Extract-SevenZipArchive {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[String]$ArchivePath,
|
||||
@@ -12,4 +12,23 @@ function Extract-7ZipArchive {
|
||||
|
||||
Write-Debug "Extract $ArchivePath to $OutputDirectory"
|
||||
7z x $ArchivePath -o"$OutputDirectory" -y | Out-Null
|
||||
}
|
||||
|
||||
function Create-SevenZipArchive {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[String]$SourceFolder,
|
||||
[Parameter(Mandatory=$true)]
|
||||
[String]$ArchivePath,
|
||||
[String]$ArchiveType = "zip",
|
||||
[String]$CompressionLevel = 5
|
||||
)
|
||||
|
||||
$ArchiveTypeArgument = "-t${ArchiveType}"
|
||||
$CompressionLevelArgument = "-mx=${CompressionLevel}"
|
||||
|
||||
Push-Location $SourceFolder
|
||||
Write-Debug "7z a $ArchiveTypeArgument $CompressionLevelArgument $ArchivePath @$SourceFolder"
|
||||
7z a $ArchiveTypeArgument $CompressionLevelArgument $ArchivePath $SourceFolder\*
|
||||
Pop-Location
|
||||
}
|
Reference in New Issue
Block a user