-
Notifications
You must be signed in to change notification settings - Fork 54
Generate NuGet packages
Julien Déramond edited this page Jul 16, 2021
·
5 revisions
- Have a windows environement
- download
nuget.exe
- into
nuget/boosted.nuspec
andnuget/boosted.saas.nuspec
check that<version>
is correct and thatdependencies
versions are correct too - into
nuget/MyGet.ps1
uncomment line 2 and 3 to declare env sourcepath and executable path
- open
powershell
- go to
boosted_folder/nuget
- run command
./Myget.ps1
- 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
- you need to be owner of boosted and boosted-sass packages
- from your account select upload package, and follow the process