Auto-tools/Projects/Mozbase: Difference between revisions

Jump to navigation Jump to search
Line 195: Line 195:
A script, versionbump.py, located at https://github.com/mozilla/mozbase/blob/master/versionbump.py
A script, versionbump.py, located at https://github.com/mozilla/mozbase/blob/master/versionbump.py
has been written to perform the steps for
has been written to perform the steps for
[https://wiki.mozilla.org/Auto-tools/Projects/MozBase#Versioning mozbase versioning]
[https://wiki.mozilla.org/Auto-tools/Projects/MozBase#Versioning mozbase versioning] :


* make sure you are on the master branch of the mozbase repository. If you aren't the script will bail out.
* Make sure you are on the master branch of the mozbase repository. If you aren't the script will bail out.


* make sure you don't have any uncommitted changes.  If you do, the script will bail out.
* Make sure you don't have any uncommitted changes.  If you do, the script will bail out.


* you should probably pull from git@github.com:mozilla/mozbase.git prior to running the script.  If not, the script will attempt to do this for you, though it will not attempt to resolve conflicts
* You should probably pull from git@github.com:mozilla/mozbase.git prior to running the script.  If not, the script will attempt to do this for you, though it will not attempt to resolve conflicts.


* as per usual, running <pre>versionbump.py --help</pre> will display usage information and help about CLI options
* As per usual, running <pre>versionbump.py --help</pre> will display usage information and help about CLI options


* <pre>versionbump.py --info</pre> will display the package versions and their dependencies and exit
* <pre>versionbump.py --info</pre> will display the package versions and their dependencies and exit


In order to bump versions, versionbump.py is used like:
In order to bump versions, [https://github.com/mozilla/mozbase/blob/master/versionbump.py versionbump.py] is used like:


   versionbump.py mozrunner=5.8 mozprofile=0.5 -m 'bug 123456 - bump mozprofile to 0.5'
   versionbump.py mozrunner=5.8 mozprofile=0.5 -m 'bug 123456 - bump mozprofile to 0.5'
Line 213: Line 213:
You should pass in all the packages that need bumping.  If you specify
You should pass in all the packages that need bumping.  If you specify
a package which is pegged as an exact dependency of another
a package which is pegged as an exact dependency of another
package (e.g. mozrunner requires mozprofile == 0.5), you must also
package (e.g. ''mozrunner'' requires ''mozprofile == 0.5''), you must also
bump all packages which exactly depend on this package.  As an
bump all packages which exactly depend on this package.  As an
example:
example:
Line 219: Line 219:
   versionbump.py mozprofile=0.5
   versionbump.py mozprofile=0.5


would not work as mozrunner requires mozprofile==0.4 (as of this
would not work as ''mozrunner'' requires ''mozprofile==0.4'' (as of this
writing) and all packages in the repository HEAD must be compatible
writing) and all packages in the repository HEAD must be compatible
with all other packages in the repository.  In addition, packages
with all other packages in the repository.  In addition, packages
pegged with '>=' also follow this rule unless --strict is passed.
pegged with '>=' also follow this rule unless ''--strict'' is passed.


* running <pre>versionbump.py --diff path/to/file</pre> will output the resultant diff to the file and revert the repository.  The repository will not be tagged nor will anything be uploaded to pypi
* running <pre>versionbump.py --diff path/to/file</pre> will output the resultant diff to the file and revert the mozbaserepository.  The repository will not be tagged nor will anything be uploaded to pypi


* -m or --message should be passed to the command line in order to finalize the commit, tag the repository, and upload to pypi.  If you do not pass -m or --message, the changes will be made to your working copy but not committed.  The repository will not be tagged nor will packages be uploaded to pypi
* -m or --message should be passed to the command line in order to finalize the commit, tag the repository, and upload to pypi.  If you do not pass -m or --message, the changes will be made to your working copy but not committed.  The repository will not be tagged nor will packages be uploaded to pypi
Line 237: Line 237:
reverted (so that it is easier to debug what happened).
reverted (so that it is easier to debug what happened).


Limitations of versionbump.py:
'''Limitations of versionbump.py:'''


* it is expected that setup.py versions are specified as <pre>PACKAGE_VERSION = '1.2.3'</pre> (or "1.2.3"). They currently all are.
* it is expected that ''setup.py'' versions are specified as <pre>PACKAGE_VERSION = '1.2.3'</pre> (or "1.2.3"). They currently all are.


* versionbump.py can only handle simple dependencies.  That is for install_requires, foo, foo == 1.2.3, bar >= 4.5.6 are fine, but foo == 1.1, == 1.2 is not.  Mozbase currently only has simple dependencies.
* versionbump.py can only handle simple dependencies.  That is for install_requires, foo, foo == 1.2.3, bar >= 4.5.6 are fine, but foo == 1.1, == 1.2 is not.  Mozbase currently only has simple dependencies.
947

edits

Navigation menu