{"action":"created","issue":{"url":"https://api.github.com/repos/BalassaMarton/MSBump/issues/2","repository_url":"https://api.github.com/repos/BalassaMarton/MSBump","labels_url":"https://api.github.com/repos/BalassaMarton/MSBump/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/BalassaMarton/MSBump/issues/2/comments","events_url":"https://api.github.com/repos/BalassaMarton/MSBump/issues/2/events","html_url":"https://github.com/BalassaMarton/MSBump/issues/2","id":249767399,"number":2,"title":"Support typical debug and release build bumping","user":{"login":"jaredthirsk","id":297187,"avatar_url":"https://avatars1.githubusercontent.com/u/297187?v=4","gravatar_id":"","url":"https://api.github.com/users/jaredthirsk","html_url":"https://github.com/jaredthirsk","followers_url":"https://api.github.com/users/jaredthirsk/followers","following_url":"https://api.github.com/users/jaredthirsk/following{/other_user}","gists_url":"https://api.github.com/users/jaredthirsk/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredthirsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredthirsk/subscriptions","organizations_url":"https://api.github.com/users/jaredthirsk/orgs","repos_url":"https://api.github.com/users/jaredthirsk/repos","events_url":"https://api.github.com/users/jaredthirsk/events{/privacy}","received_events_url":"https://api.github.com/users/jaredthirsk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-11T23:04:00Z","updated_at":"2017-08-12T09:17:43Z","closed_at":null,"body":"How can this work for both debug and release builds?  As it is now, if I switch between with the bumplabel for debug and no bumplabel for release, my release builds still have the -dev0001 suffix and I \r\ndon't want that.\r\n\r\nI'm not sure if there's a good way to do this or if you want to, but what I imagine is this:\r\n\r\nAt the start of a release build: (is it possible to do this before a build?)\r\n \r\n1. Strip the -dev0001 suffix\r\n2. Bump the revision number if the -dev0001 suffix was missing.  Otherwise don't bump it.\r\n\r\nAt the start of a debug build:\r\n\r\n1. If the -dev0001 suffix was missing: bump revision and add -dev0001\r\n2. If -dev0001 is present: increment to -dev0002 and don't bump revision.\r\n\r\nThis is perhaps a more opinionated and less open-ended approach but I would think this would facilitate the typical developer cycle better:\r\n - Automatically ensure every release build gets its own revision number\r\n - When working on new features, debug builds should be a higher version number than the previous release build.\r\n\r\nThoughts?  Also, have you considered supporting bumping of VerisionPrefix?\r\nPersonally, I'm thinking I'd just like to just set VersionPrefix once, and then have your bumper tool force the Version to match the VersionPrefix.  So if I update VersionPrefix to 1.0.3, the bumper before the build will set Version to 1.0.3.0, or 1.0.3.0-dev0001.\r\n\r\n(I'm new to publishing DLLs so I'm trying to figure out some good conventions and automation.)\r\n\r\n```\r\n  <PropertyGroup>\r\n    <VersionPrefix>1.0.2</VersionPrefix>\r\n    <Version>1.0.2.11-dev0001</Version>\r\n  </PropertyGroup>\r\n\r\n<PropertyGroup Condition=\" '$(Configuration)'=='Release'\">\r\n    <BumpRevision>True</BumpRevision>\r\n    <GeneratePackageOnBuild>True</GeneratePackageOnBuild>\r\n  </PropertyGroup>\r\n\r\n  <PropertyGroup Condition=\" '$(Configuration)'=='Debug'\">\r\n    <BumpLabel>dev</BumpLabel>\r\n    <BumpLabelDigits>4</BumpLabelDigits>\r\n    <GeneratePackageOnBuild>False</GeneratePackageOnBuild>\r\n  </PropertyGroup>\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/BalassaMarton/MSBump/issues/comments/321968446","html_url":"https://github.com/BalassaMarton/MSBump/issues/2#issuecomment-321968446","issue_url":"https://api.github.com/repos/BalassaMarton/MSBump/issues/2","id":321968446,"user":{"login":"BalassaMarton","id":7115274,"avatar_url":"https://avatars0.githubusercontent.com/u/7115274?v=4","gravatar_id":"","url":"https://api.github.com/users/BalassaMarton","html_url":"https://github.com/BalassaMarton","followers_url":"https://api.github.com/users/BalassaMarton/followers","following_url":"https://api.github.com/users/BalassaMarton/following{/other_user}","gists_url":"https://api.github.com/users/BalassaMarton/gists{/gist_id}","starred_url":"https://api.github.com/users/BalassaMarton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BalassaMarton/subscriptions","organizations_url":"https://api.github.com/users/BalassaMarton/orgs","repos_url":"https://api.github.com/users/BalassaMarton/repos","events_url":"https://api.github.com/users/BalassaMarton/events{/privacy}","received_events_url":"https://api.github.com/users/BalassaMarton/received_events","type":"User","site_admin":false},"created_at":"2017-08-12T09:17:43Z","updated_at":"2017-08-12T09:17:43Z","body":"@jaredthirsk good idea, how about adding `BumpResetLabel`, `BumpResetPatch`, etc. properties to control this? We'll still need the conditional block, but we'll have full control over bumping or resetting any part of the version.\r\nAbout supporting `VersionPrefix` and `VersionSuffix` - if I do this, I'd definitely have to rewrite the whole tool to use some sort of MSBuild project file API so that conditional blocks are properly handled (AFAIK the only usage of `VersionPrefix` and `VersionSuffix` is when you put one in a conditional block. Also, I'd have to parse both of them to determine which part of the version is in which tag, combine the two, bump it, and then split it again. I'm not sure if this can be even done with any existing API. For projects that eventually become NuGet packages, IMHO the most straight-forward versioning method is to use a single `Version` element so that your project, assembly and NuGet package versions are identical, and bump the appropriate part on build."}}
{"actor":{"display_login":"BalassaMarton"}}