-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathxscm.rb
executable file
·43 lines (34 loc) · 866 Bytes
/
xscm.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env ruby
require 'thor'
class XScm < Thor
desc "commit", ""
def commit
cmd_str = 'git add --all && git commit -m "update"'
end
desc "push remote", ""
def push(remote_name)
remote="local"
if !remote_name.empty?
remote=remote_name
end
cmd_str = "git add --all && git commit -m \"update\""
system(cmd_str)
system("git push #{remote} master")
end
desc "tag remote tag", ""
def tag(remote_name, tag_name)
tag=tag_name
remote=remote_name
cmd_str = "git tag -d #{tag_name} && git tag #{tag} && git push local :#{tag} && git push #{remote} #{tag}"
system(cmd_str)
end
desc "pod update",""
def pod(action)
if action.eql?"update"
system("pod update --no-repo-update")
elsif action.eql? "install"
system("pod install --no-repo-update")
end
end
end
XScm.start