# -*-coding:utf-8-*-
from config import BuildConfig
from shell import Shell
import os

#properties 配置
config = BuildConfig.load_properties("../../gradle.properties")
config['root'] = "../.."
config['jks_path'] = "../../jks"
config['properties'] = "../../gradle.properties"


print(" ")
print("------------- 使用帮助 -----------------")
print("1、编译apk")
print("2、修改包名，版本号+1")
print("3、创建新的签名文件")
print("4、commit & push project")
print("5、pull lib_base & cash_plugin_toolbox")
print("6、commit & push lib_base")
print("8、提交一个渠道包Tag")
print(" ")

commod = int(input("请输入指令编号："))

#命令
if commod == 2:
    app_name = BuildConfig.new_appid(config['app_name'])
    print(app_name)

elif commod == 3:
    BuildConfig.new_keystore(config)

elif commod == 4:
    Shell.push_project(config)

elif commod == 5:
    Shell.pull_base(config)
    
elif commod == 6:
    Shell.push_base(config)
    
elif commod == 8:
    Shell.push_with_tag(config)