5 Replies Latest reply on Oct 18, 2012 11:10 AM by Clebert Suconic

    Versions on branches...

    Clebert Suconic Master

      We should keep the version on our branches immutable...  that is, we never change any version on Branch_2_2_EAP, Branch_2_2_AS7, master or any new branches we create.

       

       

      Instead we should commit the version change to our local repos, and push the tag with that version, so the version change will only exist on the tag we create.

       

       

      This way we would avoid issues with any running jenkings.

        • 1. Re: Versions on branches...
          Andy Taylor Master

          is that right, in that case where will the commit exist, certainly not in any branch?

          • 2. Re: Versions on branches...
            Clebert Suconic Master

            it's right... It will be on the tag only... that means if you need to take that release, you have to get the TAG.

             

             

            It also means no PR for the release change.. it will just be on the TAG.

             

             

            you commit the version change to your local copy, then you upload the tag to upstream.

             

             

            git commit -m "version change"

            git tag <your version>

             

            #It is important you only upload <your version>, to avoid other tags going through as well (those pending tags that we try to cleanup eventually)

            git push upstream-danger <your version>

             

             

             

             

            if you look at the repo, I have done that with 2.2.22....

             

             

            git log HornetQ_2_2_22_AS7_Final

             

            commit 7c6e1246fd2bb87a6034cc08911808a0160a514f

            Author: clebert suconic <clebert.suconic@gmail.com>

            Date:   Fri Oct 12 11:13:09 2012 -0500

             

             

                version changes for 2.2.22.AS7

             

             

             

             

            I didn't commit that to any branch except to pushing the tag.

            • 3. Re: Versions on branches...
              borges Novice

              Andy Taylor wrote:

               

              is that right, in that case where will the commit exist, certainly not in any branch?

              I think a good strategy would be to make use of the fact that we have off line commits. So a person tagging a release would:

               

              • current version is XYZ-SNAPSHOT
              • change the version to XYZ.Final (using something like "mvn versions:update-child-modules")
              • commit locally, (optionally add the tag, e.g. [XYZ-BLA-FINAL])
              • change the version back to XYZ-SNAPSHOT
              • Push to GitHub, and ask for a PR

               

              So now we get a certain commit with the right version, but we never had it as the tip of our changes

              • 4. Re: Versions on branches...
                Andy Taylor Master

                I agree with Francisco, the commit should at least exist in a branch

                • 5. Re: Versions on branches...
                  Clebert Suconic Master

                  @Francisco: ok then.. lets do it...

                   

                   

                  just one thing.. we shouldn't mix code changes with version changes on the same PRs.. just to make it easier to admin it. (test cycles...etc)