forked from Awful/Awful.app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubmit.py
More file actions
executable file
·31 lines (27 loc) · 1.02 KB
/
submit.py
File metadata and controls
executable file
·31 lines (27 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
from subprocess import CalledProcessError, check_call, check_output
import sys
def find_altool():
developer_dir = check_output(['xcode-select', '-p']).strip()
return os.path.join(developer_dir, 'usr', 'bin', 'altool')
def upload_to_app_store(ipa_path, apple_id_username):
altool = find_altool()
try:
check_call([altool,
'--upload-app',
'-f', ipa_path,
'-t', 'ios',
'-u', apple_id_username,
'-p', '@keychain:Application Loader: {}'.format(apple_id_username),
])
except CalledProcessError as e:
if e.returncode == 44:
print(("To support scripted uploads: "
"please launch Application Loader, "
"sign in as '{}', "
"and tick 'Keep me logged in'."
"").format(apple_id_username),
file=sys.stderr)
raise