only release one version at a time

Require the caller to provide one release version. When we automate the
actual releasing we will want to make that variable again, but for now
it's safer to do one at a time manually.

Change-Id: I9ae6b5e0a1c0c2981f5f071237339678b79ec81a
This commit is contained in:
Doug Hellmann 2015-07-20 15:24:52 +00:00
parent 832817dd0f
commit 397b65f241
1 changed files with 16 additions and 18 deletions

View File

@ -32,9 +32,8 @@ def main():
help='a path to a YAML file specifying releases',
)
parser.add_argument(
'versions',
nargs='*',
help='versions to be released, defaults to ensuring all of them',
'version',
help='version to be released, defaults to ensuring all of them',
)
args = parser.parse_args()
@ -54,22 +53,21 @@ def main():
all_versions = {
rel['version']: rel for rel in deliverable_data['releases']
}
versions = args.versions or all_versions.keys()
version = args.version
for version in versions:
print('Version %s' % version)
this_version = all_versions[version]
# NOTE(dhellmann): For now we only support one project, until
# we rewrite the release script.
this_hash = [p['hash'] for p in this_version['projects']][0]
cmd = [
os.path.join(tools_dir, 'release_postversion.sh'),
series_name,
version,
this_hash,
deliverable_data['launchpad'],
]
subprocess.check_call(cmd)
print('Version %s' % version)
this_version = all_versions[version]
# NOTE(dhellmann): For now we only support one project, until
# we rewrite the release script.
this_hash = [p['hash'] for p in this_version['projects']][0]
cmd = [
os.path.join(tools_dir, 'release_postversion.sh'),
series_name,
version,
this_hash,
deliverable_data['launchpad'],
]
subprocess.check_call(cmd)
if __name__ == '__main__':