Skip to content
Snippets Groups Projects
Commit 779ea89e authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Merge branch 'change-log-bob5' into 'master'

final bob release changes

See merge request !102
parents c4bb2895 af35a7b5
No related branches found
No related tags found
1 merge request!102final bob release changes
......@@ -69,7 +69,7 @@ Options:
or only this package will be released.
-r, --resume The overall release will resume from the provided package name.
-q, --dry-run Only print the actions, but do not execute them.
--bob-version STR The version of bob to be released. Use with -p bob
"""
import sys
......@@ -417,22 +417,34 @@ def parse_and_process_package_changelog(gl, bob_group, pkg_name, package_changel
def release_bob(gl, bob_group, changelog_file):
instructions = '''
* Run ./check_private.sh bob.buildout bob.extension ...
with the list of packages from bob.nightlies/order.txt
* Put the list of public packages in ../../bob/requirements.txt
* Run the generate_changelog script first:
$ python generate_changelog.py -l ../../bob/requirements.txt -R -- TOKEN | tee bob_changelog.md
$ python release_bob.py -p bob -c bob_changelog.md -- TOKEN
* Put the pinnings below in requirements.txt (like ``bob.buildout == 2.1.6``) and meta.yaml (like ``bob.buildout 2.1.6``)
* Put the beta of version of the intended release version in ../../bob/version.txt
* For example do ``$ echo 5.0.0b0 > version.txt`` for bob 5.0.0 release.
* Commit only this change to master: ``$ git commit -m "prepare for bob 5 release" version.txt``
* Get the pinnings ( --bob-version needs to be changed):
$ python release_bob.py -p bob -c bob_changelog.md --bob-version 5.0.0 -- TOKEN
* Put the pinnings below in requirements.txt and meta.yaml (like ``bob.buildout == 2.1.6``) and meta.yaml (like ``bob.buildout 2.1.6``)
* Make sure you add `` # [linux]`` to Linux only packages.
* Test the conda recipe:
$ cd ../../bob
$ conda render -m ../bob.admin/gitlab/conda_build_config.yaml -c https://www.idiap.ch/software/bob/conda conda
* Update the badges and version.txt to point to this version of Bob.
* Commit, push and tag a new version manually.
$ echo 4.0.0 > version.txt
$ git commit -am "Increased stable version to 4.0.0"
$ git push
$ git tag v4.0.0
$ git push
$ git push --tags
* Put bob_changelog.md inside bob's tag description.
* Revert bob's requirement.txt and meta.yaml (no pinning) and version.txt and README.rst back to master version.
* Commit and push like this:
* Cancel the pipeline for master and make sure that tag pipeline passes
before continuing.
* Remove pinnings from bob's requirement.txt and meta.yaml and revert changes that went in README.rst back to master version.
* Commit and push the following (not verbatim):
$ echo 4.0.1b0 > version.txt
$ git commit -am "Increased latest version to 4.0.1b0"
$ git commit -am "Increased latest version to 4.0.1b0 [skip ci]"
$ git push
* Enjoy!
'''
......@@ -450,11 +462,16 @@ def release_bob(gl, bob_group, changelog_file):
saw_a_new_package = True
print(latest_pkg, '==', latest_tag)
latest_pkg = pkg
latest_tag = None
continue
if line.startswith(' *'):
latest_tag = line.split()[1][1:]
saw_a_new_package = False
print(latest_pkg, '==', latest_tag)
readme = open('../../bob/README.rst').read()
readme = _update_readme(readme, bob_version)
open('../../bob/README.rst', 'wt').write(readme)
open('../../bob/version.txt', 'wt').write(bob_version)
def main(private_token, group_name='bob', changelog_file='changelog.rst', dry_run=False, package=None, resume=False):
......@@ -514,6 +531,7 @@ def main(private_token, group_name='bob', changelog_file='changelog.rst', dry_ru
if __name__ == '__main__':
arguments = docopt(__doc__.format(sys.argv[0]), version='Changelog 0.0.1')
bob_version = arguments['--bob-version']
main(arguments['<private_token>'], group_name=arguments['--group-name'],
changelog_file=arguments['--changelog-file'], dry_run=arguments['--dry-run'],
package=arguments['--package'], resume=arguments['--resume'])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment