Class: DYAutomate::Command::Git::TagAdd
Instance Attribute Summary
#git_obj, #path
#config, #env_str, #repo_name
Instance Method Summary
collapse
#existGit?
options, #pp
Constructor Details
#initialize(argv) ⇒ TagAdd
#要查询的lib名字attr_accessor :name #查询结果lib信息attr_accessor :info
20
21
22
23
|
# File 'lib/DYAutomate/Command/Git/tagAdd.rb', line 20
def initialize(argv)
super
end
|
Instance Method Details
#add_tag(newTag) ⇒ Object
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# File 'lib/DYAutomate/Command/Git/tagAdd.rb', line 41
def add_tag(newTag)
@git_obj.tags.each{|x|
if x.name.eql?(newTag)
puts "Errror git --- #{newTag} has exist!"
end
}
begin
git.add(:all=>true)
git.commit("修改版本号 newTag")
git.push
git.add_tag(newTag, {:m => "tag更新"})
git.push('origin','master',{:tags =>newTag})
rescue
git.reset_hard()
puts "Errror git --- newTag"
end
end
|
#run ⇒ Object
36
37
38
39
|
# File 'lib/DYAutomate/Command/Git/tagAdd.rb', line 36
def run
pp('tagAdd run ...',1)
end
|
#validate! ⇒ Object
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/DYAutomate/Command/Git/tagAdd.rb', line 25
def validate!
super
end
|