def do_release(package): if not package.has_release(): print('No release for %s' % (package.__name__,)) return os.chdir(package.BASE_DIR) print('Updating changelog and version') package.update_changelog_and_version() print('Committing changes') rm.commit_pending_release(package) print('Building distribution') package.build_distribution() print('Looks good to release!') tag_name = package.tag_name() print('Creating tag %s' % (tag_name,)) tools.create_tag(tag_name) tools.push_tag(tag_name) print('Uploading distribution') package.upload_distribution()
def do_release(package): if not package.has_release(): print("No release for %s" % (package.__name__, )) return os.chdir(package.BASE_DIR) print("Updating changelog and version") package.update_changelog_and_version() print("Committing changes") rm.commit_pending_release(package) print("Building distribution") package.build_distribution() print("Looks good to release!") tag_name = package.tag_name() print("Creating tag %s" % (tag_name, )) tools.create_tag(tag_name) tools.push_tag(tag_name) print("Uploading distribution") package.upload_distribution()
def do_release(package): if not package.has_release(): print("No release for %s" % (package.__name__, )) return os.chdir(package.BASE_DIR) # If we're making a release late on New Year's Eve, hold the release # for a few minutes and ship it at midnight. For timeout details, see: # https://docs.travis-ci.com/user/customizing-the-build/#build-timeouts max_timeout = timedelta(minutes=40) while True: now = datetime.utcnow() if now.year == (now + max_timeout).year: break print("Waiting for the midnight release...") time.sleep(10) print("Updating changelog and version") package.update_changelog_and_version() print("Committing changes") rm.commit_pending_release(package) print("Building distribution") package.build_distribution() print("Looks good to release!") tag_name = package.tag_name() print("Creating tag %s" % (tag_name, )) tools.create_tag(tag_name) tools.push_tag(tag_name) print("Uploading distribution") package.upload_distribution()