{"action":"created","issue":{"url":"https://api.github.com/repos/aalmiray/clirr-gradle-plugin/issues/3","labels_url":"https://api.github.com/repos/aalmiray/clirr-gradle-plugin/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/aalmiray/clirr-gradle-plugin/issues/3/comments","events_url":"https://api.github.com/repos/aalmiray/clirr-gradle-plugin/issues/3/events","html_url":"https://github.com/aalmiray/clirr-gradle-plugin/issues/3","id":59642360,"number":3,"title":"Add heuristic to determine the baseline version automatically","user":{"login":"Flowdalic","id":432385,"avatar_url":"https://avatars.githubusercontent.com/u/432385?v=3","gravatar_id":"","url":"https://api.github.com/users/Flowdalic","html_url":"https://github.com/Flowdalic","followers_url":"https://api.github.com/users/Flowdalic/followers","following_url":"https://api.github.com/users/Flowdalic/following{/other_user}","gists_url":"https://api.github.com/users/Flowdalic/gists{/gist_id}","starred_url":"https://api.github.com/users/Flowdalic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flowdalic/subscriptions","organizations_url":"https://api.github.com/users/Flowdalic/orgs","repos_url":"https://api.github.com/users/Flowdalic/repos","events_url":"https://api.github.com/users/Flowdalic/events{/privacy}","received_events_url":"https://api.github.com/users/Flowdalic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-03T13:38:56Z","updated_at":"2015-03-03T14:23:49Z","closed_at":null,"body":"It would be great if the plugin would automatically determine the baseline version automatically, so that I don't have to change it manually between releases.\r\n\r\nMy project only guarantees API compatibility between patchlevel releases (1.2.1, 1.2.3. 1.2.42, ...), so a simply heuristic could look like\r\n\r\n1. Remove the snapshot qualifier, i.e. `-SNAPSHOT-X`\r\n2. Remove all release qualifiers, i.e. `-alphaX`, `-betaX`, `-rcX`, where `X` is an arbitrary number of digits\r\n3. If the patchlevel number is \r\n  - `0`, then don't run clirr because there is no previous release to test against\r\n  - otherwise decrement the patchlevel by one and run clirr against that release"},"comment":{"url":"https://api.github.com/repos/aalmiray/clirr-gradle-plugin/issues/comments/76953925","html_url":"https://github.com/aalmiray/clirr-gradle-plugin/issues/3#issuecomment-76953925","issue_url":"https://api.github.com/repos/aalmiray/clirr-gradle-plugin/issues/3","id":76953925,"user":{"login":"Flowdalic","id":432385,"avatar_url":"https://avatars.githubusercontent.com/u/432385?v=3","gravatar_id":"","url":"https://api.github.com/users/Flowdalic","html_url":"https://github.com/Flowdalic","followers_url":"https://api.github.com/users/Flowdalic/followers","following_url":"https://api.github.com/users/Flowdalic/following{/other_user}","gists_url":"https://api.github.com/users/Flowdalic/gists{/gist_id}","starred_url":"https://api.github.com/users/Flowdalic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flowdalic/subscriptions","organizations_url":"https://api.github.com/users/Flowdalic/orgs","repos_url":"https://api.github.com/users/Flowdalic/repos","events_url":"https://api.github.com/users/Flowdalic/events{/privacy}","received_events_url":"https://api.github.com/users/Flowdalic/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T14:23:48Z","updated_at":"2015-03-03T14:23:48Z","body":"I think is pretty \"easy\" to serve both use cases:\r\n\r\nCommon steps\r\n---------------------\r\n\r\n1. Remove the snapshot qualifier, i.e. `-SNAPSHOT-X`\r\n2. Remove all release qualifiers, i.e. `-alphaX`, `-betaX`, `-rcX`, where `X` is an arbitrary number of digits\r\n\r\nNon-Semver (only API compatiblity between patchlevel releases):\r\n------------------\r\n\r\n\r\n3. If the patchlevel number is \r\n  - `0`, then don't run clirr because there is no previous release to test against\r\n  - otherwise decrement the patchlevel by one and run clirr against that release\r\n\r\nSemver\r\n----------\r\n\r\n3. If the minor version is\r\n  - `0`, then check patchlevel version, if it is\r\n    - `0`, then don't run clirr\r\n    - otherwise decrement patchlevel and run clirr with that as baseline\r\n  - then check patchlevel, if it is\r\n    - `0` then, decrement minor by one and run clirr with that as baseline\r\n    - otherwise decrement minor by one and run clirr with that as baseline"}}