apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.6k stars 1.02k forks source link

Add bumpVersion script to increment version after release branch creation [LUCENE-5902] #6964

Closed asfimport closed 10 years ago

asfimport commented 10 years ago

Thanks to #6960 there are many less places to increment version. However, I still think this script can be useful in automating the entire process (minus the commit). This would:


Migrated from LUCENE-5902 by Ryan Ernst (@rjernst), resolved Sep 25 2014 Attachments: LUCENE-5902.patch (versions: 2)

asfimport commented 10 years ago

Ryan Ernst (@rjernst) (migrated from JIRA)

I have most of this ready to go, but I want to get opinions are part of the workflow. My current idea is to run this on the most specific branch first. So if it is a bugfix release, it would be run on the release branch. You would then run the script again on 4x, with the commit id of the change to the release branch. It would do the merge, and make the appropriate changes on 4x (ie not changing LATEST or example configs). Does this seem like a reasonable workflow? I just want to minimize the extra work that people have to do, even in merging upwards.

asfimport commented 10 years ago

Ryan Ernst (@rjernst) (migrated from JIRA)

Here's an initial patch. This does all the things I mentioned above. For major version bumps, it prints a list of things to do manually at the end.

Also, to handle creating backcompat indexes, this adds the ability to disable the security manager when running tests with -Dtests.useSecurityManager=false. It also changes the test class pattern to run whatever was passed to -Dtestcase=, regardless of whether it matches the normal pattern \*Test.class | Test\*.class

asfimport commented 10 years ago

Ryan Ernst (@rjernst) (migrated from JIRA)

The output looks something like this:

Ryans-MacBook-Pro:lucene-solr-branch_4x rjernst$ py3 ../lucene-solr/dev-tools/scripts/bumpVersion.py 4.11.0

Adding new version 4.11.0
  adding new section to lucene/CHANGES.txt...done
  adding new section to solr/CHANGES.txt...done
  adding constant LUCENE_4_11_0...done

Updating latest version
  changing version.base...done
  changing Version.LATEST to LUCENE_4_11_0...done
  updating example solrconfig.xml files
    solr/example/example-DIH/solr/db/conf/solrconfig.xml...done
    solr/example/example-DIH/solr/mail/conf/solrconfig.xml...done
    solr/example/example-DIH/solr/rss/conf/solrconfig.xml...done
    solr/example/example-DIH/solr/solr/conf/solrconfig.xml...done
    solr/example/example-DIH/solr/tika/conf/solrconfig.xml...done
    solr/example/example-schemaless/solr/collection1/conf/solrconfig.xml...done
    solr/example/multicore/core0/conf/solrconfig.xml...done
    solr/example/multicore/core1/conf/solrconfig.xml...done
    solr/example/solr/collection1/conf/solrconfig.xml...done

Creating backwards compatibility tests
  creating index.410.cfs.zip...done
  creating index.410.nocfs.zip...done
  adding new indexes to backcompat tests...done

Testing changes
  checking lucene version tests...ok
  checking solr version tests...ok
  checking backcompat tests...ok
asfimport commented 10 years ago

Ryan Ernst (@rjernst) (migrated from JIRA)

Another patch fixing some silly mistakes.

asfimport commented 10 years ago

Michael McCandless (@mikemccand) (migrated from JIRA)

+1, this looks really nice! It's great that it adds new back compat test indices ...

asfimport commented 10 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1622546 from @rjernst in branch 'dev/trunk' https://svn.apache.org/r1622546

LUCENE-5902: Add bumpVersion.py script

asfimport commented 10 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1622572 from @uschindler in branch 'dev/trunk' https://svn.apache.org/r1622572

LUCENE-5902: Make loadresource quiet

asfimport commented 10 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1622595 from @rjernst in branch 'dev/branches/branch_4x' https://svn.apache.org/r1622595

LUCENE-5902: Add bumpVersion.py script (merged 1622546 from trunk)

asfimport commented 10 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1622604 from @rjernst in branch 'dev/trunk' https://svn.apache.org/r1622604

LUCENE-5902: Handle different location for backcompat tests in trunk vs branch_4x

asfimport commented 10 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1622605 from @rjernst in branch 'dev/branches/branch_4x' https://svn.apache.org/r1622605

LUCENE-5902: Handle different location for backcompat tests in trunk vs branch_4x (merged 1622604 from trunk)

asfimport commented 10 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1622606 from @rjernst in branch 'dev/trunk' https://svn.apache.org/r1622606

LUCENE-5902: Fix bug in previous commit

asfimport commented 10 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1622607 from @rjernst in branch 'dev/branches/branch_4x' https://svn.apache.org/r1622607

LUCENE-5902: Fix bug in previous commit

asfimport commented 10 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1622609 from @rjernst in branch 'dev/trunk' https://svn.apache.org/r1622609

LUCENE-5902: Correct module name for backcompat codecs

asfimport commented 10 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1622611 from @rjernst in branch 'dev/branches/branch_4x' https://svn.apache.org/r1622611

LUCENE-5902: Make loadresource quiet (merged 1622572)

asfimport commented 10 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1622685 from @uschindler in branch 'dev/trunk' https://svn.apache.org/r1622685

LUCENE-5902: Simplify the property handling by having a default; only add explicitclass include if actually given; refactor filterchain (TODO: maybe use a one-line groovy for this, we already have groovy loaded before running tests...?)

asfimport commented 10 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1622686 from @uschindler in branch 'dev/branches/branch_4x' https://svn.apache.org/r1622686

Merged revision(s) 1622685 from lucene/dev/trunk: LUCENE-5902: Simplify the property handling by having a default; only add explicitclass include if actually given; refactor filterchain (TODO: maybe use a one-line groovy for this, we already have groovy loaded before running tests...?)

asfimport commented 10 years ago

Ryan Ernst (@rjernst) (migrated from JIRA)

After talking to some people about this script, I've realized the name may be a little confusing, since the version is only bumped on one of the branches. I'd like to rename this to addVersion.py. If there are no objections, I will do so tomorrow morning PST.

asfimport commented 10 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1627439 from @rjernst in branch 'dev/trunk' https://svn.apache.org/r1627439

LUCENE-5902: rename to addVersion.py

asfimport commented 10 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1627440 from @rjernst in branch 'dev/branches/branch_5x' https://svn.apache.org/r1627440

LUCENE-5902: rename to addVersion.py

asfimport commented 9 years ago

Anshum Gupta (@anshumg) (migrated from JIRA)

Bulk close after 5.0 release.