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.

[Feture] Let CLI extract package version from the project.

See original GitHub issue

These days project file contains properties which relates to Nu-Get packaging. Among those properties there is <Version> element.

In most cases of CI/CD we need to increment minor part or add some other suffix to the version. Hence, it would be nice if dotnet pack could return the value of <Version> element for further transformation.

ex: Project contains <Version>1.2</Version> and dotnet pack --get-package-version returns 1.2, so I can simply add .$CI_PIPELINE_IID to get the version of the package for packing and publishing.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dsplaistedcommented, Dec 2, 2020

I gave a sample of how to do this on the StackOverflow question.

1reaction
dsplaistedcommented, Dec 2, 2020

@voroninp MSBuild also has access to environment variables, so if paket doesn’t support passing custom properties you could do something like $(CI_PIPELINE_IID) in your msbuild logic to read that environment variable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extract package.json version using shell script
I'm trying to extract the value of the version field in package.json from the build.sh file. Is there a way to do this?...
Read more >
dotnet list package command - .NET CLI
The 'dotnet list package' command provides a convenient option to list the package references for a project or solution.
Read more >
'See all versions' command was removed
I have already tried `Enable Pre-Release Packages` option, it doesn't help. There is an item in whatsnew, which seems related: "Package Manager: ...
Read more >
Commands | Documentation
This will resolve all dependencies of the project and write the exact versions into poetry.lock . If you just want to update a...
Read more >
npm-version
Bump a package version. ... Bump a package version. Select CLI Version: Version 9.8.1 (Latest ... Run git commit hooks when using the...
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