ProductVersion | '):
line = f' ProductVersion | {version} | | \n'
f.write(line)
def set_snapcraft(version):
with open('snap/snapcraft.yaml','r') as f:
lines = f.readlines()
with open('snap/snapcraft.yaml','w') as f:
for line in lines:
if line.startswith('version:'):
line = f'version: "{version}"\n'
f.write(line)
def set_snap_boinc_desktop(version):
with open('snap/gui/boinc.desktop','r') as f:
lines = f.readlines()
with open('snap/gui/boinc.desktop','w') as f:
for line in lines:
if line.startswith('version='):
line = f'version="{version}"\n'
f.write(line)
if (len(sys.argv) != 2):
print('Usage: set-client-version.py VERSION')
exit(1)
version = sys.argv[1]
_, minor, release = split_version(version)
if (not is_release(minor) and release != 0):
print(f'ERROR: for development version release number should be 0 but it\'s set to {release}')
exit(1)
print(f'Setting BOINC client version to {version}...')
set_configure_ac(version)
set_version_h(version)
set_version_h_in(version)
set_version_log(version)
set_build_gradle(version)
set_installshield(version)
set_snapcraft(version)
set_snap_boinc_desktop(version)
if (os.name == 'posix' and sys.platform != 'darwin'):
print('Running autosetup...')
subprocess.call('./_autosetup -c', shell=True)
print('Done.')
|