Class: Ive::Base
- Inherits:
-
Object
- Object
- Ive::Base
- Defined in:
- lib/ive/base.rb
Instance Method Summary collapse
- #bump(type, git = false) ⇒ Object
- #initialize_version(git = false) ⇒ Object
- #list ⇒ Object
- #setup ⇒ Object
- #version ⇒ Object
Instance Method Details
#bump(type, git = false) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ive/base.rb', line 13 def bump(type, git=false) fetch_config do |config| use_git git do if git version = Bump.public_send(type, config) Git.commit version else Bump.public_send(type, config) end end end end |
#initialize_version(git = false) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/ive/base.rb', line 26 def initialize_version git=false fetch_config do |config| use_git git do if git version = Bump.initialize_version config Git.commit version else Bump.initialize_version config end end end end |
#list ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/ive/base.rb', line 5 def list puts "Ive supports the following version bumps:" puts "- major" puts "- minor" puts "- patch" puts "- build" end |
#setup ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/ive/base.rb', line 39 def setup xcode = Ive::Xcode.new if xcode configuration = Configuration.new if configuration.valid? puts "-- An .ive configuration file is already set." else config_params = xcode.initial_config if config_params Configuration.new.create_file(config_params) puts "-- .ive configuration file generated" end end else puts "-- No project file found." end end |
#version ⇒ Object
57 58 59 60 61 62 |
# File 'lib/ive/base.rb', line 57 def version fetch_config do |config| puts "-- Current version #{config.info_plist.marketing_version}" puts "-- Current build version #{config.info_plist.version}" end end |