mirror of
https://github.com/actions/python-versions.git
synced 2025-04-07 15:59:40 +00:00
Add support for unstable Python versions (#38)
* Add support of unstable versions to package generation (#2) * Add support of symver versions to Python setup scripts and tests Co-authored-by: Maksim Petrov <47208721+vmapetr@users.noreply.github.com> Co-authored-by: MaksimZhukov <v-mazhuk@microsoft.com> Co-authored-by: Maxim Lobanov <v-malob@microsoft.com>
This commit is contained in:
@ -21,7 +21,7 @@ Required parameter. The platform for which Python will be built.
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter (Mandatory=$true)][Version] $Version,
|
||||
[Parameter (Mandatory=$true)][semver] $Version,
|
||||
[Parameter (Mandatory=$true)][string] $Platform,
|
||||
[string] $Architecture = "x64"
|
||||
)
|
||||
@ -29,6 +29,7 @@ param(
|
||||
Import-Module (Join-Path $PSScriptRoot "../helpers" | Join-Path -ChildPath "common-helpers.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "../helpers" | Join-Path -ChildPath "nix-helpers.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "../helpers" | Join-Path -ChildPath "win-helpers.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "python-version.psm1") -DisableNameChecking
|
||||
|
||||
function Get-PythonBuilder {
|
||||
<#
|
||||
@ -49,13 +50,12 @@ function Get-PythonBuilder {
|
||||
|
||||
#>
|
||||
|
||||
param (
|
||||
[version] $Version,
|
||||
param(
|
||||
[semver] $Version,
|
||||
[string] $Architecture,
|
||||
[string] $Platform
|
||||
)
|
||||
|
||||
$Platform = $Platform.ToLower()
|
||||
if ($Platform -match 'win32') {
|
||||
$builder = [WinPythonBuilder]::New($Version, $Architecture, $Platform)
|
||||
} elseif ($Platform -match 'linux') {
|
||||
@ -71,5 +71,5 @@ function Get-PythonBuilder {
|
||||
}
|
||||
|
||||
### Create Python builder instance, and build artifact
|
||||
$Builder = Get-PythonBuilder -Version $Version -Architecture $Architecture -Platform $Platform
|
||||
$Builder = Get-PythonBuilder -Version $Version -Architecture $Architecture -Platform $Platform
|
||||
$Builder.Build()
|
||||
|
Reference in New Issue
Block a user