Whirr
  1. Whirr
  2. WHIRR-514

Update release instructions or fix update-version script?

    Details

    • Type: Task Task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.8.0
    • Component/s: documentation
    • Labels:
      None

      Description

      The update-versions script doesn't handle modules without a /project/parent/version element (the build-tools module doesn't have one).

      karel@tomato:~/work/whirr$ ruby build-tools/update-versions 12345
      Updating to version 12345 ...
      build-tools/update-versions:61:in `process_module': undefined method `inner_html=' for nil:NilClass (NoMethodError)
      from build-tools/update-versions:54:in `edit_pom'
      from build-tools/update-versions:60:in `process_module'
      from build-tools/update-versions:73
      from build-tools/update-versions:73:in `each'
      from build-tools/update-versions:73
      from build-tools/update-versions:54:in `edit_pom'
      from build-tools/update-versions:67

        Activity

        Hide
        Karel Vervaeke added a comment -

        There's also mvn versions:set and mvn versions:commit, but that has another minor problem which I haven't figured out:
        mvn versions:commit doesn't clean up services/zookeeper/pom.xml.versionsBackup.

        Anyway fixing update-versions is easy enough. Committing now.

        Show
        Karel Vervaeke added a comment - There's also mvn versions:set and mvn versions:commit, but that has another minor problem which I haven't figured out: mvn versions:commit doesn't clean up services/zookeeper/pom.xml.versionsBackup. Anyway fixing update-versions is easy enough. Committing now.
        Hide
        Andrei Savu added a comment -

        BTW we are not actually using the update-versions script when doing the release - I've always done this using bash & sed.

        Show
        Andrei Savu added a comment - BTW we are not actually using the update-versions script when doing the release - I've always done this using bash & sed.
        Hide
        Karel Vervaeke added a comment -

        I'll have to do this tomorrow. Subversion's driving me nuts.

        Show
        Karel Vervaeke added a comment - I'll have to do this tomorrow. Subversion's driving me nuts.
        Hide
        Karel Vervaeke added a comment -

        I'm would like to avoid the risk of sed accidentally replacing the version number for dependencies which happen to have the same version number. This is for an automated build system so there's no room for checking by hand every time.

        I've updated the script to also include voldemort (It wasn't detected because the module is added via a profile).
        Two more problems to solve:

        • The version string is present as a String constant in Java code (WhirrKarafTestSupport), I would like to factor that out.
        • The update script now sets /project/parent/version for all poms. It should not do this for the root pom.
        Show
        Karel Vervaeke added a comment - I'm would like to avoid the risk of sed accidentally replacing the version number for dependencies which happen to have the same version number. This is for an automated build system so there's no room for checking by hand every time. I've updated the script to also include voldemort (It wasn't detected because the module is added via a profile). Two more problems to solve: The version string is present as a String constant in Java code (WhirrKarafTestSupport), I would like to factor that out. The update script now sets /project/parent/version for all poms. It should not do this for the root pom.
        Hide
        Karel Vervaeke added a comment -

        The update script no longer sets /project/parent/version in the root pom.
        In hindsight, the problem with mvn versions:commit (see first comment) was also because the voldemort module is added via a profile, so you can simply do this:

        mvn versions:set -DgroupId=org.apache.whirr -DnewVersion=1.2.3
        mvn -Pvoldemort versions:commit

        This is better than the update script because it doesn't mess with whitespace in the poms. I'll update the release docs to do it this way if nobody minds.

        Show
        Karel Vervaeke added a comment - The update script no longer sets /project/parent/version in the root pom. In hindsight, the problem with mvn versions:commit (see first comment) was also because the voldemort module is added via a profile, so you can simply do this: mvn versions:set -DgroupId=org.apache.whirr -DnewVersion=1.2.3 mvn -Pvoldemort versions:commit This is better than the update script because it doesn't mess with whitespace in the poms. I'll update the release docs to do it this way if nobody minds.
        Hide
        Karel Vervaeke added a comment -

        This patch removes the hard-coded whirr version constant from the java code. Please confirm if you agree to commit this.

        Show
        Karel Vervaeke added a comment - This patch removes the hard-coded whirr version constant from the java code. Please confirm if you agree to commit this.
        Hide
        Karel Vervaeke added a comment -

        The first patch was missing a change

        Show
        Karel Vervaeke added a comment - The first patch was missing a change
        Hide
        Karel Vervaeke added a comment -

        Removed attachments - tests still failing. Sorry for the noise

        Show
        Karel Vervaeke added a comment - Removed attachments - tests still failing. Sorry for the noise
        Hide
        Karel Vervaeke added a comment -

        Here we go again.

        Show
        Karel Vervaeke added a comment - Here we go again.
        Hide
        Andrei Savu added a comment -

        +1 (ps. I was unable to apply the patch but it looks good to me)

        Show
        Andrei Savu added a comment - +1 (ps. I was unable to apply the patch but it looks good to me)
        Hide
        Karel Vervaeke added a comment -

        About being unable to apply the patch: I forgot adding --no-prefix to git diff. Next time I forget, you should try patch -p1 < ....

        Show
        Karel Vervaeke added a comment - About being unable to apply the patch: I forgot adding --no-prefix to git diff. Next time I forget, you should try patch -p1 < ....
        Hide
        Frank Scholten added a comment -

        Also had that problem with git. Run 'git config --global diff.noprefix true' to have git always use the --no-prefix option.

        Show
        Frank Scholten added a comment - Also had that problem with git. Run 'git config --global diff.noprefix true' to have git always use the --no-prefix option.
        Hide
        Karel Vervaeke added a comment -

        Did that, thx. I think this can be closed now.

        Show
        Karel Vervaeke added a comment - Did that, thx. I think this can be closed now.

          People

          • Assignee:
            Unassigned
            Reporter:
            Karel Vervaeke
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development