Generate NuGet packages - Orange-OpenSource/Orange-Boosted-Bootstrap GitHub Wiki

Prerequisites

  • Have a windows environement
  • download nuget.exe
  • into nuget/boosted.nuspec and nuget/boosted.saas.nuspec check that <version> is correct and that dependencies versions are correct too
  • into nuget/MyGet.ps1 uncomment line 2 and 3 to declare env sourcepath and executable path

Generate nupkg

  • open powershell (pwsh)
  • go to boosted_folder/nuget
  • run command ./Myget.ps1

For macOS users only

  • install Powershell with brew install --cask powershell
  • install nuget
  • install mono
  • modify MyGet.ps1 (need some work here to have something close to the original file):
# set env vars usually set by MyGet (enable for local testing)
$env:SourcesPath = '..'

Copy-Item $env:SourcesPath/LICENSE $env:SourcesPath/LICENSE.txt # has to be .txt extension, don't check in

# parse the version number out of package.json
$bsversionParts = ((Get-Content $env:SourcesPath/package.json) -join "`n" | ConvertFrom-Json).version.split('-', 2) # split the version on the '-'
$bsversion = $bsversionParts[0]

if ($bsversionParts.Length -gt 1) {
  $bsversion += '-' + $bsversionParts[1].replace('.', '').replace('-', '_') # strip out invalid chars from the PreRelease part
}

# create packages
& /Library/Frameworks/Mono.framework/Versions/Current/bin/mono /usr/local/bin/nuget.exe pack "$env:SourcesPath/nuget/boosted.nuspec" -Verbosity detailed -NonInteractive -NoPackageAnalysis -BasePath $env:SourcesPath -Version $bsversion
& /Library/Frameworks/Mono.framework/Versions/Current/bin/mono /usr/local/bin/nuget.exe pack "$env:SourcesPath/nuget/boosted.sass.nuspec" -Verbosity detailed -NonInteractive -NoPackageAnalysis -BasePath $env:SourcesPath -Version $bsversion

And that's all you'll now have 2 packages boosted.sass.X.X.X.nupkg and boosted.X.X.X.nupkg where X.X.X represent the version

Publish packages onto nuget.org

  • you need to be owner of boosted and boosted-sass packages
  • from your account select upload package, and follow the process
⚠️ **GitHub.com Fallback** ⚠️