{"action":"created","issue":{"url":"https://api.github.com/repos/ParticularLabs/GitVersion/issues/335","labels_url":"https://api.github.com/repos/ParticularLabs/GitVersion/issues/335/labels{/name}","comments_url":"https://api.github.com/repos/ParticularLabs/GitVersion/issues/335/comments","events_url":"https://api.github.com/repos/ParticularLabs/GitVersion/issues/335/events","html_url":"https://github.com/ParticularLabs/GitVersion/issues/335","id":53367875,"number":335,"title":"Feature branch with GitHubFlowVersion doesn't append pre release tag","user":{"login":"MacDennis76","id":6223582,"avatar_url":"https://avatars.githubusercontent.com/u/6223582?v=3","gravatar_id":"","url":"https://api.github.com/users/MacDennis76","html_url":"https://github.com/MacDennis76","followers_url":"https://api.github.com/users/MacDennis76/followers","following_url":"https://api.github.com/users/MacDennis76/following{/other_user}","gists_url":"https://api.github.com/users/MacDennis76/gists{/gist_id}","starred_url":"https://api.github.com/users/MacDennis76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MacDennis76/subscriptions","organizations_url":"https://api.github.com/users/MacDennis76/orgs","repos_url":"https://api.github.com/users/MacDennis76/repos","events_url":"https://api.github.com/users/MacDennis76/events{/privacy}","received_events_url":"https://api.github.com/users/MacDennis76/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-05T06:25:46Z","updated_at":"2015-01-11T14:51:11Z","closed_at":null,"body":"I am testing version 2.0.0 of GitVersion, the command line version in combination with a GitHubFlow repository. This repo has a master branch and a number of feature branches.\r\n\r\nThe latest tag (on master) is equal to 1.6.0.\r\n\r\nWhen working with feature branches the following is the result, in this example a feature branch called 'feature-test' is used:\r\n\r\n{\r\n  \"Major\":1,\r\n  \"Minor\":6,\r\n  \"Patch\":1,\r\n  \"PreReleaseTag\":\"\",\r\n  \"PreReleaseTagWithDash\":\"\",\r\n  \"BuildMetaData\":9,\r\n  \"FullBuildMetaData\":\"9.Branch.feature-test.Sha.747cf43601b10dd87508ba7d72a47c0e9321294b\",\r\n  \"MajorMinorPatch\":\"1.6.1\",\r\n  \"SemVer\":\"1.6.1\",\r\n  \"LegacySemVer\":\"1.6.1\",\r\n  \"LegacySemVerPadded\":\"1.6.1\",\r\n  \"AssemblySemVer\":\"1.6.1.0\",\r\n  \"AssemblyFileSemVer\":\"1.6.1.0\",\r\n  \"FullSemVer\":\"1.6.1+9\",\r\n  \"InformationalVersion\":\"1.6.1+9.Branch.feature-test.Sha.747cf43601b10dd87508ba7d72a47c0e9321294b\",\r\n  \"ClassicVersion\":\"1.6.1.9\",\r\n  \"ClassicVersionWithTag\":\"1.6.1.9\",\r\n  \"BranchName\":\"feature-test\",\r\n  \"Sha\":\"747cf43601b10dd87508ba7d72a47c0e9321294b\",\r\n  \"NuGetVersionV2\":\"1.6.1\",\r\n  \"NuGetVersion\":\"1.6.1\"\r\n}\r\n\r\nIs this expected behaviour?\r\nBecause this is a pre release I would have expect a pre release tag?\r\nThis is without a NextVersion.txt file, when I add one with a version equal to '1.7.0' the following is the result:\r\n\r\n{\r\n  \"Major\":1,\r\n  \"Minor\":7,\r\n  \"Patch\":0,\r\n  \"PreReleaseTag\":\"\",\r\n  \"PreReleaseTagWithDash\":\"\",\r\n  \"BuildMetaData\":11,\r\n  \"FullBuildMetaData\":\"11.Branch.feature-test.Sha.bf90ef4e6e000dd876f47fae510052ddfae8c23d\",\r\n  \"MajorMinorPatch\":\"1.7.0\",\r\n  \"SemVer\":\"1.7.0\",\r\n  \"LegacySemVer\":\"1.7.0\",\r\n  \"LegacySemVerPadded\":\"1.7.0\",\r\n  \"AssemblySemVer\":\"1.7.0.0\",\r\n  \"AssemblyFileSemVer\":\"1.7.0.0\",\r\n  \"FullSemVer\":\"1.7.0+11\",\r\n  \"InformationalVersion\":\"1.7.0+11.Branch.feature-test.Sha.bf90ef4e6e000dd876f47fae510052ddfae8c23d\",\r\n  \"ClassicVersion\":\"1.7.0.11\",\r\n  \"ClassicVersionWithTag\":\"1.7.0.11\",\r\n  \"BranchName\":\"feature-test\",\r\n  \"Sha\":\"bf90ef4e6e000dd876f47fae510052ddfae8c23d\",\r\n  \"NuGetVersionV2\":\"1.7.0\",\r\n  \"NuGetVersion\":\"1.7.0\"\r\n}\r\n\r\nMy plan is to use GitVersion in combination with TeamCity and Octopus Deploy. Each feature should be deployable to a testing environment and this means that I would need to be able to also package (NuGet) and deploy pre releases (features).\r\n\r\nSo, very curious to know if this is normal behaviour.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ParticularLabs/GitVersion/issues/comments/69496950","html_url":"https://github.com/ParticularLabs/GitVersion/issues/335#issuecomment-69496950","issue_url":"https://api.github.com/repos/ParticularLabs/GitVersion/issues/335","id":69496950,"user":{"login":"MacDennis76","id":6223582,"avatar_url":"https://avatars.githubusercontent.com/u/6223582?v=3","gravatar_id":"","url":"https://api.github.com/users/MacDennis76","html_url":"https://github.com/MacDennis76","followers_url":"https://api.github.com/users/MacDennis76/followers","following_url":"https://api.github.com/users/MacDennis76/following{/other_user}","gists_url":"https://api.github.com/users/MacDennis76/gists{/gist_id}","starred_url":"https://api.github.com/users/MacDennis76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MacDennis76/subscriptions","organizations_url":"https://api.github.com/users/MacDennis76/orgs","repos_url":"https://api.github.com/users/MacDennis76/repos","events_url":"https://api.github.com/users/MacDennis76/events{/privacy}","received_events_url":"https://api.github.com/users/MacDennis76/received_events","type":"User","site_admin":false},"created_at":"2015-01-11T14:51:11Z","updated_at":"2015-01-11T14:51:11Z","body":"I tried the latest source which includes  #337. \r\n\r\nThe result with a feature branch called feature/TOHISP-55\r\n\r\n{\r\n  \"Major\":1,\r\n  \"Minor\":6,\r\n  \"Patch\":1,\r\n  \"PreReleaseTag\":\"TOHISP-55\",\r\n  \"PreReleaseTagWithDash\":\"-TOHISP-55\",\r\n  \"BuildMetaData\":2,\r\n  \"FullBuildMetaData\":\"2.Branch.feature/TOHISP-55.Sha.9f5ccc8addd702da2b235b202f3acf562a7b297b\",\r\n  \"MajorMinorPatch\":\"1.6.1\",\r\n  \"SemVer\":\"1.6.1-TOHISP-55\",\r\n  \"LegacySemVer\":\"1.6.1-TOHISP55\",\r\n  \"LegacySemVerPadded\":\"1.6.1-TOHISP55\",\r\n  \"AssemblySemVer\":\"1.6.1.0\",\r\n  \"AssemblyFileSemVer\":\"1.6.1.0\",\r\n  \"FullSemVer\":\"1.6.1-TOHISP-55+2\",\r\n  \"InformationalVersion\":\"1.6.1-TOHISP-55+2.Branch.feature/TOHISP-55.Sha.9f5ccc8addd702da2b235b202f3acf562a7b297b\",\r\n  \"ClassicVersion\":\"1.6.1.2\",\r\n  \"ClassicVersionWithTag\":\"1.6.1.2-TOHISP-55\",\r\n  \"BranchName\":\"feature/TOHISP-55\",\r\n  \"Sha\":\"9f5ccc8addd702da2b235b202f3acf562a7b297b\",\r\n  \"NuGetVersionV2\":\"1.6.1-tohisp55\",\r\n  \"NuGetVersion\":\"1.6.1-tohisp55\"\r\n}\r\n\r\nLooks good to me.\r\n\r\nBut, this is the result when you use a hyphen in a branch called feature-TOHISP-55 which is a valid name for a branch:\r\n\r\n{\r\n  \"Major\":1,\r\n  \"Minor\":7,\r\n  \"Patch\":0,\r\n  \"PreReleaseTag\":\"\",\r\n  \"PreReleaseTagWithDash\":\"\",\r\n  \"BuildMetaData\":13,\r\n  \"FullBuildMetaData\":\"13.Branch.feature-TOHISP-91.Sha.729e1b66f9adf293536860dc94a9272408de1004\",\r\n  \"MajorMinorPatch\":\"1.7.0\",\r\n  \"SemVer\":\"1.7.0\",\r\n  \"LegacySemVer\":\"1.7.0\",\r\n  \"LegacySemVerPadded\":\"1.7.0\",\r\n  \"AssemblySemVer\":\"1.7.0.0\",\r\n  \"AssemblyFileSemVer\":\"1.7.0.0\",\r\n  \"FullSemVer\":\"1.7.0+13\",\r\n  \"InformationalVersion\":\"1.7.0+13.Branch.feature-TOHISP-91.Sha.729e1b66f9adf293536860dc94a9272408de1004\",\r\n  \"ClassicVersion\":\"1.7.0.13\",\r\n  \"ClassicVersionWithTag\":\"1.7.0.13\",\r\n  \"BranchName\":\"feature-TOHISP-91\",\r\n  \"Sha\":\"729e1b66f9adf293536860dc94a9272408de1004\",\r\n  \"NuGetVersionV2\":\"1.7.0\",\r\n  \"NuGetVersion\":\"1.7.0\"\r\n}\r\n\r\nThe Stash repo has the following format:\r\nhttps://stash/scm/customer/client-project.git\r\n\r\nThe following test fails:\r\n        [Test]\r\n        public void ShouldNotUseNumberInFeatureBranchAsPreReleaseNumberWithHyphen()\r\n        {\r\n            using (var fixture = new EmptyRepositoryFixture(new Config()))\r\n            {\r\n                fixture.Repository.MakeATaggedCommit(\"1.0.0\");\r\n                fixture.Repository.CreateBranch(\"feature-JIRA-123\");\r\n                fixture.Repository.Checkout(\"feature-JIRA-123\");\r\n                fixture.Repository.MakeCommits(5);\r\n\r\n                fixture.AssertFullSemver(\"1.0.1-JIRA-123+5\");\r\n            }\r\n        }\r\n\r\nResult:\r\n\r\nCreated git repository at 'D:\\web\\GitVersion\\GitVersionCore.Tests\\bin\\Release\\TestRepositories\\4d01858c-8426-4345-a995-9c85ca5f094e'\r\nRunning against branch: feature-JIRA-123\r\nGitHubFlow version strategy will be used\r\nShouldly.ChuckedAWobbly : \r\n                    fixture.AssertFullSemver(\"1.0.1-JIRA-123+5\");\r\n        should be\r\n    \"1.0.1-JIRA-123+5\"\r\n        but was\r\n    \"1.0.1-feature-JIRA-123+5\"\r\n\r\n"}}