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.

Migrating from GitVersion

See original GitHub issue

I’m migrating away from GitVersion which I couldn’t ever get quite stable, and trying to replicate something like a branching of dev -> main where dev is where all the work happens, and then main results in a build and a new version bump.

Occasionally I might need to get a build from dev that is something like a preview or beta build.

My issue mainly revolves are trying to integration the CLI into my build pipeline, given I’ve already got tags representing previous versions.

Is there any guidance on initial setup like this using Azure DevOps? I’m finding that I need to manually tag a build to get the right version at the moment.

Currently the build YAML looks like this:

variables:
  MinVer: ''
.
.
.
- task: PowerShell@2
  displayName: 'Set MinVer Version'
  inputs:
    targetType: inline
    script: |
      $version = dotnet minver -v e
      echo "##vso[task.setvariable variable=MinVer]$version"
      Write-Host "Setting MinVer to '$version'"

- task: PowerShell@2
  displayName: 'Updating AssemblyInfo'
  inputs:
    targetType: filePath
    filePath: "build/scripts/build/update-version-info.ps1"
    arguments: "-newVersion $(MinVer) -filePath build/msbuild/Properties/AssemblyInfo_Versioning.cs"
.
.
.
- task: DotNetCoreCLI@2
  displayName: '.NET Core: Pack'
  condition: succeeded()
  inputs:
    command: custom
    custom: pack
    arguments: $(solutionFile) --nologo -c $(buildConfiguration) -v q -m --include-symbols --include-source --output $(build.artifactstagingdirectory)/dropartifacts/ /p:Version=$(MinVer) 

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
adamralphcommented, Jan 18, 2021

@kieronlanning I’ll close this now.

If you have more questions, please feel free to start a discussion.

1reaction
kieronlanningcommented, Jan 5, 2021

@adamralph I guess I had it there because previously I’d used GitVersion to update that file prior to the build happening.

In my minds eye, I was trying to replicate that because it nicely separated the builds from versioning, plus there was zero dependencies within the solution/ projects as it was a Azure DevOps concern.

But I’ll pull all that out, and try it with the package instead.


EDIT: @adamralph I’ve not forgotten, just swept up in something else. I’ll get back to this as soon as I can, thanks for your help so far!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration
To create your config file just type gitversion init in your repo directory, after installing. A minimal GitVersion.yml configuration file will be created....
Read more >
Migrating to Git Version Control is not just about Git!
Migrating from non-distributed version control to Git is a really significant mindset-shift in itself, and this perhaps explains why less ...
Read more >
Migrating to Git
If you have an existing codebase in another VCS but you've decided to start using Git, you must migrate your project one way...
Read more >
Migrating from SVN to Git version control - Part 2
One simple way to do this is to just export your code from SVN (which gives you the code without the .svn directories)...
Read more >
Migrating your version control to Git? Here's what you need ...
Migrating from one version control to Git is just that type of change that can make team members and leaders feel overwhelmed.
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