Browse Source

Create release script.

pull/92/head
Abhishek 4 years ago
parent
commit
a8f6a685ae
  1. 36
      Clocker/release.py

36
Clocker/release.py

@ -0,0 +1,36 @@
import sys
import os
# Increment the version + build number
# Change scheme to Release
# Build and Analyze
# Notarize the version
# Zip and upload it as a Github release
# Update appcast.xml
def handle_command_execution(command, return_value):
if return_value != 0:
print(command + " failed with return value of "+str(return_value))
def increment_build_number():
# Print the build number. Use the -terse to limit the output to just the buld number
check_version_command = "agvtool what-version"
handle_command_execution(check_version_command, os.system(check_version_command))
# Bump the build number
bump_version_command = "agvtool next-version -increment-minor-version"
handle_command_execution(bump_version_command, os.system(bump_version_command))
def increment_version_to(new_version):
check_version_command = "agvtool new-marketing-version "+new_version
handle_command_execution(check_version_command, os.system(check_version_command))
def main():
if len(sys.argv) < 2:
print("Doh! Enter the new release version")
return
increment_version_to(sys.argv[1])
increment_build_number()
main()
Loading…
Cancel
Save