Commit e1755bf0 by sikang

test

parent 8da250eb
......@@ -39,4 +39,6 @@ elif commod == 5:
elif commod == 6:
Shell.push_base(config)
\ No newline at end of file
elif commod == 8:
Shell.push_with_tag(config)
\ No newline at end of file
......@@ -18,7 +18,7 @@ class Shell:
#commit&push lib_base
@staticmethod
def push_base(config):
commit_msg = input("输入commit msg:\n")
commit_msg = input("输入commit msg:")
command = "%s\n%s\n%s\n%s\n" \
% (
"cd %s/%s" % (config['root'],"lib_base"),
......@@ -46,3 +46,18 @@ class Shell:
"git pull"
)
os.system(command)
#push with tag
@staticmethod
def push_with_tag(config):
Shell.push_project(config)
tagName="t%s-%s" % (config['corp_id'],config['app_id'])
command = "%s\n%s\n%s\n%s\n" \
% (
"cd %s" % config['root'],
"git tag -d %s" % tagName,
"git push origin --delete tag %s" % tagName,
"git tag -a %s -m %s" % (tagName,tagName),
"git push origin %s" % tagName,
)
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