Commit e34b384c by sikang

update script

parent 2b6d5ff5
......@@ -27,6 +27,7 @@ print("12、马甲包切换")
print("13、打印checklist")
print("14、生成隐协议文件")
print("15、刷新本地协议")
print("21、reset project")
command = int(input("请输入指令编号:"))
......@@ -77,3 +78,6 @@ elif command == 14:
elif command == 15:
Function.update_local_privacy(config)
elif command == 21:
Shell.reset_project(config)
......@@ -86,4 +86,18 @@ class Shell:
commit_id = input("输入commit id: ")
os.system("git reset --hard %s"% commit_id)
print(" ")
\ No newline at end of file
#reset project
@staticmethod
def reset_project(config):
command = "%s\n%s\n%s\n%s\n%s\n" \
% (
"cd %s" % config['root'],
"git checkout . && git clean -df",
"cd lib_base || { echo \"lib_base not exist!\"; exit 1; }",
"git checkout . && git clean -df",
"git reset --hard origin/master",
)
os.system(command)
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