-
Notifications
You must be signed in to change notification settings - Fork 652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitFlowVersion paired with ripple on feature branch can fail #54
Comments
Lets just take the first 6 characters of the SHA? And fail the build if we still go over 20? On Tue, Dec 10, 2013 at 6:20 AM, danielmarbach notifications@github.comwrote:
|
@andreasohlund that doesnt give us much to work with
so given @danielmarbach s example the version would be @danielmarbach do you have any ideas on a convention? |
How about {version}-{NameOfBranch.First(6)}-{SHA.First(6)}? On Tue, Dec 10, 2013 at 9:08 AM, Simon Cropp notifications@github.comwrote:
|
As long as it works with ripple. Fine! |
If we follow proper SemVer as define here: Wouldn't we need?: Version-stability+AnythingElse Therefore 0.6.0-{alpha¦feature¦....First(6)}+{sha.First(6)} |
I'm referring especially to the following chapters: A pre-release version MAY be denoted by appending a hyphen and a series of dot Build metadata MAY be denoted by appending a plus sign and a series of dot
|
Any news on how to progress here? From: Andreas Öhlund [mailto:notifications@github.com] How about {version}-{NameOfBranch.First(6)}-{SHA.First(6)}? On Tue, Dec 10, 2013 at 9:08 AM, Simon Cropp < mailto:notifications@github.com notifications@github.com>wrote:
— |
Slightly OT but we actually don't build feature branches (since it will http://blog.half-ogre.com/posts/software/rules-of-the-open-road/ That said, since you rarely use the binaries of a featurebranch perhaps we {develop.major}.{develop.minor}.{develop.patch}-Feature{SHA.First(6)} ? On Wed, Dec 11, 2013 at 8:23 PM, danielmarbach notifications@github.comwrote:
|
Fine for me. Did you read the semver specs?
|
I have read them, what part are you referring to? Since this is a nuget constraint another option would be to keep it as is On Wed, Dec 11, 2013 at 9:16 PM, danielmarbach notifications@github.comwrote:
|
I think the nuget version GFV provides is wrong. According to the specs it should be {major}.{minor}.{patch}-{stability}+{additional}
|
So you're saying that it should be eg: 0.6.0-Feature+8A50C5 Assuming Stability=Feature Ifaik nuget would blow up if you include a + sign in the nuget version? On Thu, Dec 12, 2013 at 11:12 AM, danielmarbach notifications@github.comwrote:
|
Just reread the nuget spec. You’re right they don’t support full semver specs. Additional: version.ToString().Take(20) Would it be better to take Last(6) of the SHA to get every changing identifier per commit? From: Andreas Öhlund [mailto:notifications@github.com] So you're saying that it should be eg: 0.6.0-Feature+8A50C5 Assuming Stability=Feature Ifaik nuget would blow up if you include a + sign in the nuget version? On Thu, Dec 12, 2013 at 11:12 AM, danielmarbach < mailto:notifications@github.com notifications@github.com>wrote:
— |
I thought that first 6 was always unique? (enough) On Thu, Dec 12, 2013 at 12:49 PM, danielmarbach notifications@github.comwrote:
|
FWIW, I'm a TeamCity old-hat as well. I created a build step between the build and pack phases. The step executed the following posh script: $rx = "^(\d\.\d.\d)-([^-]+)-(.+)/(.+)-(\w{40})$"
$tc_bn = "%build.number%"
$gf_v = "%GitFlowVersion.Version%"
$gf_nv = "%GitFlowVersion.NugetVersion%"
$m = $tc_bn -match $rx
if ($m)
{
$tc_bn = "$($matches[1])-$($matches[2])-$($matches[5])".Substring(0,20)
echo "##teamcity[buildNumber '$tc_bn']"
}
$m = $gf_v -match $rx
if ($m)
{
$gf_v = "$($matches[1])-$($matches[2])-$($matches[5])".Substring(0,20)
echo "##teamcity[setParameter name='GitFlowVersion.Version' value='$gf_v']"
}
$m = $gf_nv -match $rx
if ($m)
{
$gf_nv = "$($matches[1])-$($matches[2])-$($matches[5])".Substring(0,20)
echo "##teamcity[setParameter name='GitFlowVersion.NugetVersion' value='$gf_nv']"
} After that Nuget is happy. It just sucks Nuget has this limitation though. I read the comment thread above and elected to use the branch type (feature, hotfix, etc.) instead of the branch "name" (if you consider the true name to not have the type prefix). However, I like that my Maven feature builds produce artifacts with the branch "name" in the version. Oh well. |
Feature branches and pull requests will always sort lower than develop now because we use {major}.{minor}.{patch}.{numberCommitsInFrontOfMaster}-unstable so I think ripple will always use that, making this issue done? I think I should add a feature branch example to the wiki, will open an issue for that and close this issue. |
I got the followin scenario:
It seems that the nuget version is bound to max 20 chars.
I tagged develop and branch from it to a feature branch.
The text was updated successfully, but these errors were encountered: