Document requirement to commit version.json changes, and add build warning
See original GitHub issueI have the following version.json:
{
"version": "1.0.0",
"publicReleaseRefSpec": [
"^refs/heads/net-core$"
]
}
The .csproj contains:
<Version>1.0.14.0</Version>
<AssemblyVersion>1.0.0</AssemblyVersion>
<FileVersion>1.0.14.0</FileVersion>
Previously the version was 1.0.0-beta.{height}
and I got the expected version set on building. I modified the version.json to the version shown and when I run dotnet build MyProject.csproj //p:PublicRelease=true -c Release
I get assemblies in the Release folder with the beta information for the Product version. dotnet pack
produce a NuGet package with the beta versioning on it also.
I’ve run dotnet clean
, manually deleted all generated artifacts, etc. and still get the same results. I’ve also tried running MSBuild with the same results.
nbgv get-version
produces:
Version: 1.0.0.1
AssemblyVersion: 1.0.0.0
AssemblyInformationalVersion: 1.0.0-beta.1+gc94793e392
NuGet package Version: 1.0.0-beta-0001-gc94793e392
NPM package Version: 1.0.0-beta-0001-gc94793e392
Where is it getting that information from?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9
Top Results From Across the Web
Document requirement to commit version.json changes ...
I modified the version.json to the version shown and when I run dotnet build MyProject.csproj //p:PublicRelease=true -c Release I get assemblies ...
Read more >Do I commit the package-lock.json file created by npm 5?
Short answer: yes. One comment: when package-lock.json changes you can make a commit of just that change, separate from other source changes.
Read more >package.json
This document is all you need to know about what's required in your package.json file. It must be actual JSON, not just a...
Read more >rush.json
* The commit message to use when committing changes during 'rush version'. * * For example, if you want to prevent these commits...
Read more >Build specification reference for CodeBuild
Provides reference information about build specification (buildspec) files in AWS CodeBuild.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yup. That’s looking better. When you step back and think about how this all works from a build server perspective, of course you need to commit those files otherwise the build server is never going to see the changes. Maybe a warning like
version.json has uncommitted changes, using committed version to generate version
would be helpful.In my defense, I’m not a build engineer, I just sometimes play one at work.
Thanks!
To be fair, it’s not the normal way of using the tool, but I expect a lot of people do what I do and try to figure out if/how it works locally before deploying to their production build server and may not have a testing build server available (yay corporate red-tape!).