question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document requirement to commit version.json changes, and add build warning

See original GitHub issue

I 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:open
  • Created 5 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

4reactions
colin-youngcommented, Oct 8, 2018

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!

1reaction
colin-youngcommented, Oct 7, 2018

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!).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found