You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Jean-Philippe Caruana (JIRA)" <ji...@apache.org> on 2014/08/12 17:09:11 UTC

[jira] [Commented] (BUILDR-593) Invalid Guessing of Next Version Number

    [ https://issues.apache.org/jira/browse/BUILDR-593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14094140#comment-14094140 ] 

Jean-Philippe Caruana commented on BUILDR-593:
----------------------------------------------

What version do you expect ?  1.2-RC-6-SNAPSHOT ?  1.3-RC-1-SNAPSHOT ? 2.0-RC-1-SNAPSHOT ? Every project has a different version politic.

I think you should implement your own versioning scheme in your buildfile. 

For instance, in my project, I like to update only the y in x.y.z when making a release, not the x.
I want :  4.22.0-SNAPSHOT -> 4.22.0 -> 4.23.0-SNAPSHOT
buildr does : 4.22.0-SNAPSHOT -> 4.22.0 -> 5.0.0-SNAPSHOT

With a few lines of code, I could make it work :
````ruby
Release.next_version = lambda do |this_version|
  new_version = VERSION_NUMBER.split /\./
  new_version[1] = new_version[1].to_i + 1
  new_version[2] = '0-SNAPSHOT'
  new_version.join '.'
end
````

I think this should not be an issue for you to implement it. (and I don't think this is a buildr issue)

Hope this helps

> Invalid Guessing of Next Version Number
> ---------------------------------------
>
>                 Key: BUILDR-593
>                 URL: https://issues.apache.org/jira/browse/BUILDR-593
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.4.6
>         Environment: Fedora 15, Ruby 1.8.7
>            Reporter: Marc-André Laverdière
>            Priority: Minor
>              Labels: release, version
>             Fix For: 1.5
>
>
> When doing a release the algorithm which chooses the next version may yield a wrong result.
> Here is an example: 1.2-RC-5-SNAPSHOT -> 1.2-RC-5 -> 1.000003-SNAPSHOT



--
This message was sent by Atlassian JIRA
(v6.2#6252)