Class: ObjectiveRelease::Release
- Inherits:
-
Object
- Object
- ObjectiveRelease::Release
- Defined in:
- lib/objective_release/release.rb
Instance Method Summary collapse
Instance Method Details
#update_bundle_version(plist_file) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/objective_release/release.rb', line 3 def update_bundle_version(plist_file) parsed_plist = parse_plist(plist_file) version_string = parsed_plist['CFBundleVersion'] parsed_plist['CFBundleVersion'] = increment_version(version_string) exported_plist = Plist::Emit.dump(parsed_plist) export_plist(plist_file, exported_plist) end |
#update_release_notes(release_notes_file) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/objective_release/release.rb', line 11 def update_release_notes(release_notes_file) release_notes = File.read(release_notes_file) version_number = release_notes.split("\n").first new_version_number = increment_version(version_number) last_deployed_sha = release_notes.split("\n")[2].split.first system "git log #{last_deployed_sha}..HEAD --pretty=oneline > /tmp/commit-log.txt" latest_commits = File.read(File.("/tmp/commit-log.txt")) new_release_notes = latest_commits.insert(0, "v#{new_version_number}\n\n") export_release_notes(release_notes_file, new_release_notes) end |