Class: TripAdvisor::ReleaseBuild
- Inherits:
-
AbstractBuild
- Object
- AbstractBuild
- TripAdvisor::ReleaseBuild
- Defined in:
- lib/trip_advisor/build.rb
Instance Attribute Summary collapse
-
#release_version ⇒ Object
Returns the value of attribute release_version.
Attributes inherited from AbstractBuild
#info, #path, #pod_repo, #remotes, #repo, #reporter, #version_prefix
Instance Method Summary collapse
- #build! ⇒ Object
-
#initialize(path, release_version) ⇒ ReleaseBuild
constructor
A new instance of ReleaseBuild.
- #tag_name ⇒ Object
- #version ⇒ Object
Methods inherited from AbstractBuild
#author, #commit!, #pod_update!, #podspec_file, #push!, #push_podspec!, #run, #tag!, #update_build_assets, #update_staging_area
Constructor Details
#initialize(path, release_version) ⇒ ReleaseBuild
Returns a new instance of ReleaseBuild.
188 189 190 191 192 |
# File 'lib/trip_advisor/build.rb', line 188 def initialize(path, release_version) super(path) @release_version = release_version File.write(File.join(path, 'VERSION'), "#{release_version}") end |
Instance Attribute Details
#release_version ⇒ Object
Returns the value of attribute release_version.
186 187 188 |
# File 'lib/trip_advisor/build.rb', line 186 def release_version @release_version end |
Instance Method Details
#build! ⇒ Object
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/trip_advisor/build.rb', line 194 def build! say "Creating Release build at path: #{path}" Dir.chdir(path) do update_build_assets pod_update! files = [podspec_file, 'BUILD.json', 'Podfile.lock', 'VERSION'] target = commit!(files) say "Committed updates to #{files.join(', ')} (ref: #{target})" tag!(target) say "Tagged build as #{tag_name}" push! say "Pushed to #{remotes.join(', ')}" push_podspec! say "Pushed podspec to spec repository '#{pod_repo}'" update_staging_area(files) end say "Build complete." end |
#tag_name ⇒ Object
217 218 219 |
# File 'lib/trip_advisor/build.rb', line 217 def tag_name "#{version_prefix}#{version}" end |
#version ⇒ Object
213 214 215 |
# File 'lib/trip_advisor/build.rb', line 213 def version @version ||= "#{release_version}" end |