forked from aws-amplify/aws-sdk-android
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add release maven result to s3, sdk zip file to latest folder of s3
- Loading branch information
sunchunqiang
committed
Jan 10, 2019
1 parent
7085d88
commit bcdcbb4
Showing
4 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,3 +68,6 @@ fastlane/readme.md | |
|
||
# maven file | ||
target/ | ||
|
||
#python comile | ||
__pycache__/ |
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import os | ||
import sys | ||
from functions import getmodules | ||
from functions import runcommand | ||
from shutil import copyfile | ||
from pathlib import Path | ||
root = sys.argv[1] | ||
version = sys.argv[2] | ||
s3profile = sys.argv[3] | ||
s3prefix=sys.argv[4] | ||
#"aws-android-sdk-stage-csun/com/amazonaws" | ||
|
||
modules = getmodules(root) | ||
for module in modules: | ||
target = os.path.join(root, module, "target") | ||
s3maven = os.path.join(target, "s3maven") | ||
runcommand("mkdir -p '{0}'".format(s3maven)) | ||
for file in os.listdir(target): | ||
sourcefile = os.path.join(target, file) | ||
if os.path.isfile(sourcefile) and (version in file): | ||
targetfile = os.path.join(s3maven, file) | ||
copyfile(sourcefile, targetfile) | ||
print("upload module {0} ...".format(module)) | ||
runcommand('aws s3 sync "{0}" s3://{1}/{2}/{3} --profile {4}'.format(s3maven, s3prefix, module,version,s3profile)) |