Commit 724292b0 by sikang

updae

parent d9878639
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
from config import BuildConfig from config import BuildConfig
from shell import Shell from shell import Shell
import os import os
import shutil
#properties 配置 #properties 配置
config = BuildConfig.load_properties("../../gradle.properties") config = BuildConfig.load_properties("../../gradle.properties")
...@@ -19,7 +20,7 @@ print("4、commit & push project") ...@@ -19,7 +20,7 @@ print("4、commit & push project")
print("5、pull lib_base & cash_plugin_toolbox") print("5、pull lib_base & cash_plugin_toolbox")
print("6、commit & push lib_base") print("6、commit & push lib_base")
print("8、提交一个渠道包Tag") print("8、提交一个渠道包Tag")
print(" ") print("11、copy apk")
commod = int(input("请输入指令编号:")) commod = int(input("请输入指令编号:"))
...@@ -42,3 +43,15 @@ elif commod == 6: ...@@ -42,3 +43,15 @@ elif commod == 6:
elif commod == 8: elif commod == 8:
Shell.push_with_tag(config) Shell.push_with_tag(config)
elif commod == 11:
file_name="%s_%s" % (config['corp_id'], config['app_name'])
apk_local = "%s/resGuardApks/%s.apk" % (config['root'], file_name)
apk1 = "/Users/connor/Documents/apks/%s.apk" % file_name
apk2 = "/Users/connor/Documents/apks/%s/%s.apk" % (file_name, file_name)
if os.path.exists("/Users/connor/Documents/apks/%s" % file_name):
shutil.copy(apk_local, apk2)
else:
shutil.copy(apk_local, apk1)
\ No newline at end of file
...@@ -45,7 +45,8 @@ andResGuard { ...@@ -45,7 +45,8 @@ andResGuard {
// finalApkBackupPath = "${project.rootDir}/final.apk" // finalApkBackupPath = "${project.rootDir}/final.apk"
android.applicationVariants.all { variant -> android.applicationVariants.all { variant ->
variant.outputs.all { variant.outputs.all {
finalApkBackupPath = "${project.rootDir}/resGuardApks/${project.rootProject.name}_${variant.buildType.name}.apk" def appName = "${app_name}".replace(" ","-")
finalApkBackupPath = "${project.rootDir}/resGuardApks/${appName}_${variant.buildType.name}.apk"
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment