mirror of
https://github.com/actions/python-versions.git
synced 2025-04-08 00:09:39 +00:00
mplement script to build and prepare packages for Python
This commit is contained in:
18
helpers/win-helpers.psm1
Normal file
18
helpers/win-helpers.psm1
Normal file
@ -0,0 +1,18 @@
|
||||
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