Class: XZGit::XZUpVersion
- Inherits:
-
Command
- Object
- CLAide::Command
- Command
- XZGit::XZUpVersion
show all
- Defined in:
- lib/mrbin/xzcommand/xzupversion.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
read_private_token, read_remote_project, run, verify_git_repo
Constructor Details
Returns a new instance of XZUpVersion.
14
15
16
17
|
# File 'lib/mrbin/xzcommand/xzupversion.rb', line 14
def initialize(argv)
@version = argv.option('version','')
super
end
|
Class Method Details
.options ⇒ Object
9
10
11
12
13
|
# File 'lib/mrbin/xzcommand/xzupversion.rb', line 9
def self.options
[
['--version','new version']
].concat(super)
end
|
Instance Method Details
#run ⇒ Object
33
34
35
36
|
# File 'lib/mrbin/xzcommand/xzupversion.rb', line 33
def run
update_app_version(@version)
updateserver(@version)
end
|
#validate! ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/mrbin/xzcommand/xzupversion.rb', line 19
def validate!
super
if @version.empty?
puts "--version is required"
exit(1)
end
root_path = Dir.pwd()
dev_path = "#{root_path}/Podfile"
if !File.exist?(dev_path)
puts "not found podfile,must excute in podfile directory"
exit(1)
end
end
|