mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Simplify nbgv version setting
This commit is contained in:
19
set-nbgv-version.ps1
Normal file
19
set-nbgv-version.ps1
Normal file
@@ -0,0 +1,19 @@
|
||||
$scriptDir = $PSScriptRoot
|
||||
$path = Join-Path $scriptDir "Cargo.toml"
|
||||
$version = (nbgv get-version -v NuGetPackageVersion).Trim()
|
||||
Write-Host "Setting version to $version"
|
||||
|
||||
(Get-Content $path) | ForEach-Object {
|
||||
if ($_ -match '^version\s*=\s*".*"') {
|
||||
$_ -replace '^version\s*=\s*".*"', "version = `"$version`""
|
||||
}
|
||||
else {
|
||||
$_
|
||||
}
|
||||
} | Set-Content $path
|
||||
|
||||
cargo update --offline
|
||||
cargo pkgid -p velopack
|
||||
|
||||
Set-Location "$scriptDir/src/lib-nodejs"
|
||||
npm version $version --no-git-tag-version
|
||||
Reference in New Issue
Block a user