Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 15 2020 13:06
    arturcic unlabeled #2095
  • Jun 15 2020 13:05
    arturcic opened #2328
  • Jun 15 2020 08:09
    github-actions[bot] commented #2122
  • Jun 15 2020 08:09
    github-actions[bot] commented #2300
  • Jun 15 2020 08:09
    github-actions[bot] commented #2306
  • Jun 15 2020 08:09
    github-actions[bot] commented #2310
  • Jun 15 2020 08:09
    github-actions[bot] commented #2311
  • Jun 15 2020 08:09
    github-actions[bot] commented #2320
  • Jun 15 2020 08:09
    github-actions[bot] commented #2327
  • Jun 15 2020 07:49
    arturcic milestoned #2095
  • Jun 15 2020 07:49
    arturcic demilestoned #2095
  • Jun 15 2020 07:46

    arturcic on 5.3.6

    (compare)

  • Jun 15 2020 07:27
    arturcic demilestoned #2241
  • Jun 15 2020 07:27
    arturcic unassigned #2241
  • Jun 15 2020 07:27
    arturcic demilestoned #2074
  • Jun 15 2020 07:26
    arturcic milestoned #2327
  • Jun 15 2020 07:25
    arturcic demilestoned #2318
  • Jun 15 2020 07:25
    arturcic milestoned #2122
  • Jun 15 2020 07:25
    arturcic labeled #2122
  • Jun 15 2020 07:23
    arturcic demilestoned #2313
mzanin
@mzanin
What is the standard procedure for updating the TeamCity build name for those who are using GitVersion.MSBuild?
I had this working for the last 2 years then all of a sudden the build name reverted back to just showing the build count (most likely the TeamCity update killed it), but I cannot for the life of me figure out how I got this to work without using an additional build step
bitbonk
@bitbonk
Simpler noob question here: if I want to run GitVersion locally so the version number will be generated correctly, what branch from the server have to exist locally? Only the one that is checked out or others too?
Frank Hommers
@frankhommers
@bitbonk You need to check out the branch which you want to have the version stamped on. I am not sure if you understand gitversion enough by asking this question.
bitbonk
@bitbonk

@frankhommers Well I read in the docs under requirements:

Main branch

The repository needs to have an existing local master or main branch.

Develop branch

For some branch strategies (such as Git Flow), a local develop branch needs to exist.

This message was deleted
This message was deleted
This message was deleted
bitbonk
@bitbonk
That got me thinking. It could indeed mean I do not yet properly understand GitVersion
Andriy Binetsky
@abinet
Hi all,
probably very silly question. I am using GitHub actions/gitversion/execute. Is there any output variable to flag whether the new version was incremented (and we need to push a tag back) or existing tag has been used for the version?
wattsSamuel
@wattsSamuel

Hi all,
I've been using the gitversion/execute@0 task for the last year which has been working fine. All of a sudden today it's failing with the error

[error]SyntaxError: Unexpected end of JSON input

I can't for the life of me think of anything that's changed our end and wondering if it's potentially a connection issue. Has anyone else encountered this recently ?

wattsSamuel
@wattsSamuel
Ah this looks like it's related
GitTools/GitVersion#3081
LePirlouit
@lepirlouit
Hello, I would like to use gitversion to generate version like
YYYYY.MM.month_increment
is this possible ?
bitbonk
@bitbonk
Is there a way to use GitVersion and https://keepachangelog.com together? How could CI/CD update the version in CHANCELOG.md
Mattias Karlsson
@devlead
I've combined GitVersion with GitReleaseManager to create my release notes from GitHub issues and milestones. Maybe that's an option https://github.com/GitTools/GitReleaseManager
bitbonk
@bitbonk
although that would be a much nicer approach, it doesn't fit our current workflow it would require much more discipline :)
What semantics do branches named support/ have in the gitversion universe? It is mentioned several times in the docs but the meaning of the branches are never really explained.
bitbonk
@bitbonk
Is this just a generic term for Supporting Branches like feature/, hotfix/, release/ ?
Gary Ewan Park
@gep13
@bitbonk have you seen the following: https://gitversion.net/docs/learn/branching-strategies/gitflow/examples#support-branches This goes into more details about it. GitVersion’s own GitHub repository is currently set up to use a support. branch for 5.x, since there are upcoming breaking changes for the 6.0.0 release
bitbonk
@bitbonk
@gep13 OK, that makes sense, thank you. In a GitFlow scenario with gitversion, I wonder how I should name the branch, that merges the changes of a finished release from main back to develop. It is not really a feature/ branch is it?
Gary Ewan Park
@gep13
Why do you need a branch for this? Why not simply merge main directly into develop?
bitbonk
@bitbonk
it is basically because of CHANGELOG.md. It needs to be merged which often needs to be done by fixing merge conflicts.
But since develop is a protected branch we can't push the resolved conflicts there directly.
Gary Ewan Park
@gep13

I am not sure I follow. What branch protection rule would prevent a resolved merge conflict from being pushed?

To answer your question though… as long as you don’t include a version number (which could throw GitVersion off) in the branch name, it shouldn’t matter what you call this intermediate branch.

bitbonk
@bitbonk

What branch protection rule would prevent a resolved merge conflict from being pushed?

The rule that commits to main and develop can only be done through a PR.

Gary Ewan Park
@gep13
Ah! Gotcha.
I don’t enable that rule :smile:
bitbonk
@bitbonk
It was a team decision
Guess I could just define a new canonical name.
I wonder what a good name could be.
It is supposed to be a very short lived branch
Gary Ewan Park
@gep13
What about something like finalize/1.2.0, or perhaps reconcile/1.2.0. I am including the version number here, which would match the release/hotfix version number that was just merged into main.
bitbonk
@bitbonk
Looks good - There is no chance that GitVersion will interpret those version numbers and does something with it?
Gary Ewan Park
@gep13
I can’t guarantee that, as this is not an approach that i have seen used before. Best suggestion would be to try it on a test repository, and see how it works out.
bitbonk
@bitbonk
I find it surprising that this problem isn’t more common since I would think that keepachangelog.com as well as PR-protecting main and develop branches should be fairly common in teams.
If it is not so common, we might need to revisit our team decisions - I wouldn’t think that our needs are so special, maybe we‘re approaching it not quite from the right angle.
Gary Ewan Park
@gep13
We used to maintain a changelog.md, but then we switched to using the release section of GitHub as a single source of truth. In addition, the ability to add assets to the release again means that everything is in one place. We found that some folks got confused by the changelog in say the develop branch compared to the master branch, as these typically weren’t in sync.
AndrewAckroyd
@AndrewAckroyd
Hi, how do you get this working with .net6 as a DevOps Task?
AndrewAckroyd
@AndrewAckroyd
DevOps erro It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '2.1.0' (x64) was not found.
rachel-lou
@rachel-lou
I have setup the Bitbucket config in Jenkins according to GitVersion - Jenkins
I am building on a Pull Request in Jenkins, and I am receiving an “InvalidOperationException: Gitversion could not determine which branch to treat as the development branch (default is 'develop') nor releaseable branch (default is 'main' or 'master'), either locally or remotely”
Is this a Bitbucket/GitVersion integration problem? (another team's gitversion worked using the Git configurations in Jenkins, but when they switched (in order to integrate pull request behavior) to Bitbucket configurations, they also saw this error. Their workaround is to trying to update version 20 times in the build). If there's any documentation/support for this error, please direct me to it
Andoni Morales Alastruey
@ylatuya
Hi, it seems that GitVersion isn't working with GitHub Actions. I have created GitTools/GitVersion#3100 and managed to reproduce the issue with a very simple repository ylatuya/bug-gitversion-githubactions#1
3 replies
Andoni Morales Alastruey
@ylatuya
It's a very simple scenario, nothing rare: a newly created project with dotnet new console with GitVersion.MsBuild added as a nuget. I suspect I am doing something wrong since it's very demo case
Paul Wheeler
@pwhe23

Is it possible to have more control over the formatting of the "assembly-informational-format" setting when using GitVersion.yml and the MSBuild task?
1) For example, I would like to left pad an environment variable so it is prefixed with zeros to be 6 digits.
2) I would also like to allow spaces instead of requiring dashes (for legacy reasons even though this may not meet the spec)

I'm currently using this value:
assembly-informational-format: '{Major}.{Minor}.{env:BUILD_BUILDNUMBER ?? 000001}+{ShortSha} {BranchName} {env:SYSTEM_DEBUG ?? DEBUG}'

And the output current is:
2022.8.5372+0a34655-QA-DEBUG

What I want is:
2022.08.005372+0a34655 QA DEBUG

Thanks for any assistance!

joseph-freeman
@joseph-freeman
Good afternoon! I am hoping to get some insight on an an issue I'm having. Currently I have a repo branching structure of dev, qa, prod. I'm attempting to set dev as the main/default branch but I'm seeing a message that reads Multiple branch configurations match the current branch branchName of 'dev'. Using the first matching configuration, 'dev'". From what I've read on the internet, GitVersion by default looks for a "develop" branch. I assumed using branches.regex: ^dev$ would override that but doesn't seem to work. A bit of clarity on how this would work (overriding the default branch) would be most helpful
Pedro Parra Ortega
@pedroparraortega

Hi all, does anyone knows why if i run gitversion on my local i get

{
  "Major": 1,
  "Minor": 0,
  "Patch": 3,
  "PreReleaseTag": "",
  "PreReleaseTagWithDash": "",
  "PreReleaseLabel": "",
  "PreReleaseLabelWithDash": "",
  "PreReleaseNumber": null,
  "WeightedPreReleaseNumber": 60000,
  "BuildMetaData": 5,
  "BuildMetaDataPadded": "0005",
  "FullBuildMetaData": "5.Branch.master.Sha.0712903090e3c46321b2648b694a1ca5f2c7ca63",
  "MajorMinorPatch": "1.0.3",
  "SemVer": "1.0.3",
  "LegacySemVer": "1.0.3",
  "LegacySemVerPadded": "1.0.3",
  "AssemblySemVer": "1.0.3.0",
  "AssemblySemFileVer": "1.0.3.0",
  "FullSemVer": "1.0.3+5",
  "InformationalVersion": "1.0.3+5.Branch.master.Sha.0712903090e3c46321b2648b694a1ca5f2c7ca63",
  "BranchName": "master",
  "EscapedBranchName": "master",
  "Sha": "0712903090e3c46321b2648b694a1ca5f2c7ca63",
  "ShortSha": "0712903",
  "NuGetVersionV2": "1.0.3",
  "NuGetVersion": "1.0.3",
  "NuGetPreReleaseTagV2": "",
  "NuGetPreReleaseTag": "",
  "VersionSourceSha": "112ece8dc679ae30d5d4a8016219d34224598ab7",
  "CommitsSinceVersionSource": 5,
  "CommitsSinceVersionSourcePadded": "0005",
  "UncommittedChanges": 0,
  "CommitDate": "2022-05-04"
}

but running from the CI i get

{
    "Major": 1,
    "Minor": 0,
    "Patch": 1,
    "PreReleaseTag": "",
    "PreReleaseTagWithDash": "",
    "PreReleaseLabel": "",
    "PreReleaseLabelWithDash": "",
    "PreReleaseNumber": null,
    "WeightedPreReleaseNumber": 60000,
    "BuildMetaData": 8,
    "BuildMetaDataPadded": "0008",
    "FullBuildMetaData": "8.Branch.master.Sha.0712903090e3c46321b2648b694a1ca5f2c7ca63",
    "MajorMinorPatch": "1.0.1",
    "SemVer": "1.0.1",
    "LegacySemVer": "1.0.1",
    "LegacySemVerPadded": "1.0.1",
    "AssemblySemVer": "1.0.1.0",
    "AssemblySemFileVer": "1.0.1.0",
    "FullSemVer": "1.0.1+8",
    "InformationalVersion": "1.0.1+8.Branch.master.Sha.0712903090e3c46321b2648b694a1ca5f2c7ca63",
    "BranchName": "master",
    "EscapedBranchName": "master",
    "Sha": "0712903090e3c46321b2648b694a1ca5f2c7ca63",
    "ShortSha": "0712903",
    "NuGetVersionV2": "1.0.1",
    "NuGetVersion": "1.0.1",
    "NuGetPreReleaseTagV2": "",
    "NuGetPreReleaseTag": "",
    "VersionSourceSha": "eb8fe45f4264863ef03af627f0fcc805a856b603",
    "CommitsSinceVersionSource": 8,
    "CommitsSinceVersionSourcePadded": "0008",
    "UncommittedChanges": 0,
    "CommitDate": "2022-05-04"
  }

on same commit

1 reply
Simon Novak
@snovak7
how can I prefix feature branches or any other branches with such a prefix that it sorts last... so it's not polluting my nuget repository in front, so basically I would prefix with something in the beginning of alphabet -a-something
so in a way I would want prefix + useBranchName
is this feasible, I didn't try I must confess
GurdipS5
@GurdipS5
quick question. this looks like a great tool, but itd be great if it could also generate my changelog.md files. is that possible?