mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
fix python versions
This commit is contained in:
20
.github/set-nbgv-version.ps1
vendored
20
.github/set-nbgv-version.ps1
vendored
@@ -4,6 +4,7 @@ param(
|
||||
|
||||
$originalLocation = Get-Location
|
||||
|
||||
# setting cargo workspace version
|
||||
$scriptDir = "$PSScriptRoot/.."
|
||||
$path = Join-Path $scriptDir "Cargo.toml"
|
||||
Write-Host "Setting version to $version"
|
||||
@@ -17,9 +18,28 @@ Write-Host "Setting version to $version"
|
||||
}
|
||||
} | Set-Content $path
|
||||
|
||||
# setting nodejs version
|
||||
Set-Location "$scriptDir/src/lib-nodejs"
|
||||
npm version $version --no-git-tag-version
|
||||
|
||||
# setting pyproject.toml version
|
||||
$pyprojectPath = [IO.Path]::Combine($scriptDir, 'src', 'lib-python', 'pyproject.toml')
|
||||
|
||||
$pythonVersion = $version
|
||||
if ($pythonVersion -match '-g') {
|
||||
$pythonVersion = $pythonVersion -replace '-g', '.dev+'
|
||||
}
|
||||
|
||||
(Get-Content $pyprojectPath) | ForEach-Object {
|
||||
if ($_ -match '^version\s*=\s*".*"') {
|
||||
$_ -replace '^version\s*=\s*".*"', "version = `"$pythonVersion`""
|
||||
}
|
||||
else {
|
||||
$_
|
||||
}
|
||||
} | Set-Content $pyprojectPath
|
||||
|
||||
# copying README.md
|
||||
Copy-Item -Path "$scriptDir/README_NUGET.md" -Destination "$scriptDir/src/lib-nodejs/README.md" -Force
|
||||
Copy-Item -Path "$scriptDir/README_NUGET.md" -Destination "$scriptDir/src/lib-rust/README.md" -Force
|
||||
|
||||
|
||||
Reference in New Issue
Block a user