Comments (5)
@micdenny thoughts?
from housekeeping.
the following simple PS script should do the trick:
$root = (split-path -parent $MyInvocation.MyCommand.Definition) + '\..'
$version = [System.Reflection.Assembly]::LoadFile("$root\< assembly path >").GetName().Version
$versionStr = "{0}.{1}.{2}" -f ($version.Major, $version.Minor, $version.Build)
Write-Host "Setting .nuspec version tag to $versionStr"
$content = (Get-Content $root\< Nuget spec file >.nuspec)
$content = $content -replace '\$version\$',$versionStr
$content | Out-File $root\< compiled output >.compiled.nuspec
& $root\NuGet\NuGet.exe pack $root\< compiled output >.compiled.nuspec
As far as I have understood the assembly version
is set by the AppVeyor build, thus the following line will always output 1.0.0:
$version = [System.Reflection.Assembly]::LoadFile("$root\< assembly path >").GetName().Version
$versionStr = "{0}.{1}.{2}" -f ($version.Major, $version.Minor, $version.Build)
That is only downside that can be easily overcome manually setting the version at the command line given that this proposal is to reduce the pain in some corner case scenarios.
from housekeeping.
The PS script could also use the AppVeyor local config file as the source for the version values, given that the process will be used only when working locally we have no interest at all in setting the correct version values in the AssemblyInfo
file, the aim is to create the NuGet package.
Given the aim the script is also not interested at all in debug or release build, it will be debug only.
from housekeeping.
each time a PR is built the resulting artifacts, thus the NuGet package as well, are stored by AppVeyor on the build server, the developer could manually download them and host them on a local/offline NuGet server
artifacts for PR are already pushed on AppVeyor and they are free to be downloaded by everyone:
I think this is the easiest way, to avoid adding to much complex on the build process, and leave an easy way to instantly test a PR, just download the nuget package and use it.
And listen this, appveyor has also got its own nuget feed for this use-cases! 😄
for instance Radical
project has this appveyor public nuget feed: https://ci.appveyor.com/nuget/radical-beci3al3osa3
and every build package will go there, even the PR that does not create a new build number, but in those cases the last build will overwrite the previous package, but it's just a matter of correctly dump the version on the PR and you're good to go, or of course just manually download the package or binaries.
from housekeeping.
I just tested this and everything worked like a charm. Closing.
from housekeeping.
Related Issues (20)
- End to End tests HOT 1
- Do we need a Unity4 package? HOT 2
- setup protected branches for master and develop HOT 1
- Customer Improvement Program HOT 1
- Enable GitLink on all repos to facilitate code step through while debugging HOT 2
- Radical.Windows.Presentation should be merged into Radical.Windows HOT 2
- Spike reverse the DI container configuration responsibiltiy in Radical.Bootstrapper HOT 1
- Support only .NET 4.5.2 and up HOT 6
- Add in all repo a reference to the new doc site
- Add "ShouldHandle" behavior to broker HOT 1
- Add request/response support to broker HOT 1
- Can "Build.Support" repo be deleted? HOT 2
- .NET Core 3.0 support HOT 1
- Upgrade projects to new project system HOT 1
- Understand what GitReleasemanager can do for us HOT 1
- Repo(s) housekeeping and new features HOT 1
- Move away from Waffle to an Org level GitHub project HOT 1
- Move away from GitFlow: it harms our ability to release HOT 1
- Remove Radical.Boostrapper from organization HOT 1
- Remove Radical.CQRS from organization HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from housekeeping.