MyGet.ps1 935 B

123456789101112131415161718
  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. $nuget = $env:NuGet
  5. # parse the version number out of package.json
  6. $bsversionParts = ((Get-Content $env:SourcesPath\package.json) -join "`n" | ConvertFrom-Json).version.split('-', 2) # split the version on the '-'
  7. $bsversion = $bsversionParts[0]
  8. if ($bsversionParts.Length -gt 1)
  9. {
  10. $bsversion += '-' + $bsversionParts[1].replace('.', '').replace('-', '_') # strip out invalid chars from the PreRelease part
  11. }
  12. # create packages
  13. & $nuget pack "$env:SourcesPath\nuget\bootstrap.nuspec" -Verbosity detailed -NonInteractive -NoPackageAnalysis -BasePath $env:SourcesPath -Version $bsversion
  14. & $nuget pack "$env:SourcesPath\nuget\bootstrap.sass.nuspec" -Verbosity detailed -NonInteractive -NoPackageAnalysis -BasePath $env:SourcesPath -Version $bsversion