]> git.ipfire.org Git - ipfire.org.git/blob - src/scss/bootstrap-4.0.0-alpha.6/nuget/MyGet.ps1
Introduce autotools
[ipfire.org.git] / src / scss / bootstrap-4.0.0-alpha.6 / nuget / MyGet.ps1
1 # set env vars usually set by MyGet (enable for local testing)
2 #$env:SourcesPath = '..'
3 #$env:NuGet = "./nuget.exe" #https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
4
5 $nuget = $env:NuGet
6
7 # parse the version number out of package.json
8 $bsversionParts = ((Get-Content $env:SourcesPath\package.json) -join "`n" | ConvertFrom-Json).version.split('-', 2) # split the version on the '-'
9 $bsversion = $bsversionParts[0]
10
11 if ($bsversionParts.Length -gt 1)
12 {
13 $bsversion += '-' + $bsversionParts[1].replace('.', '').replace('-', '_') # strip out invalid chars from the PreRelease part
14 }
15
16 # create packages
17 & $nuget pack "$env:SourcesPath\nuget\bootstrap.nuspec" -Verbosity detailed -NonInteractive -NoPackageAnalysis -BasePath $env:SourcesPath -Version $bsversion
18 & $nuget pack "$env:SourcesPath\nuget\bootstrap.sass.nuspec" -Verbosity detailed -NonInteractive -NoPackageAnalysis -BasePath $env:SourcesPath -Version $bsversion