|
|
|
@ -33,7 +33,6 @@ def upload_qiniuyunoss(key, token, file_path): |
|
|
|
|
raise AssertionError(info.text) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class FLY_CLI_SER(object): |
|
|
|
|
|
|
|
|
|
def __init__(self, fly_cli_domain, fly_cli_token): |
|
|
|
@ -44,7 +43,7 @@ class FLY_CLI_SER(object): |
|
|
|
|
"APIAUTHORIZATION": fly_cli_token |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
def get_upload_token(self, bundleid, type): |
|
|
|
|
def get_upload_token(self, bundleid, type): |
|
|
|
|
url = '%s/api/v2/fir/server/analyse' % self.fly_cli_domain |
|
|
|
|
data = {"bundleid": bundleid, "type": type} |
|
|
|
|
req = requests.post(url, json=data, headers=self._header) |
|
|
|
@ -63,7 +62,6 @@ class FLY_CLI_SER(object): |
|
|
|
|
return |
|
|
|
|
raise AssertionError(req.text) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def upload_local_storage(self, upload_key, upload_token, app_id, file_path): |
|
|
|
|
url = '%s/api/v2/fir/server/upload' % self.fly_cli_domain |
|
|
|
|
m = MultipartEncoder(fields={ |
|
|
|
@ -87,7 +85,6 @@ class FLY_CLI_SER(object): |
|
|
|
|
return |
|
|
|
|
raise AssertionError(req.text) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def upload_app(self, app_path): |
|
|
|
|
appobj = AppInfo(app_path) |
|
|
|
|
appinfo = appobj.get_app_data() |
|
|
|
@ -264,4 +261,3 @@ if __name__ == '__main__': |
|
|
|
|
if os.path.isfile(app_path): |
|
|
|
|
fly_obj.upload_app(app_path) |
|
|
|
|
raise FileNotFoundError(app_path) |
|
|
|
|
|
|
|
|
|