Created
July 3, 2017 10:38
-
-
Save pgmillon/3fc92187a0f0b7bff76add0c138f6965 to your computer and use it in GitHub Desktop.
MP version fix script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import ConfigParser | |
defaults = {'other_versions': None, 'prepared': 'False', 'performed': 'False', 'branched': 'False', | |
"profiles": '', "auto_increment_policy": "auto_patch"} | |
release_ini = ConfigParser.SafeConfigParser(defaults=defaults) | |
mp_config = ConfigParser.SafeConfigParser() | |
with open('nuxeo/marketplace/release.ini') as fp: | |
release_ini.readfp(fp) | |
with open('integration-scripts/marketplace.ini') as fp: | |
mp_config.readfp(fp) | |
marketplaces = release_ini.sections() | |
for marketplace in marketplaces: | |
print marketplace + ': ' + release_ini.get('DEFAULT', '{0}-tag'.format(marketplace)) | |
mp_config.set(marketplace, 'branch', release_ini.get('DEFAULT', '{0}-tag'.format(marketplace))) | |
with open('integration-scripts/marketplace.ini', 'w') as fp: | |
mp_config.write(fp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment