Skip to content

Commit

Permalink
Append new changes on the top of file
Browse files Browse the repository at this point in the history
  • Loading branch information
pietrocaselani committed Jan 13, 2019
1 parent 5ccdca3 commit 3be58af
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@ private_lane :update_changelog_file do |options|
version_name = options[:version_name]
changelog = options[:changelog]

open('../changelog.md', 'a') do |f|
f << "# #{version_name} \n#{changelog}"
end
current_changelog = File.read('../changelog.md')

new_changelog = "# #{version_name} \n#{changelog}\n\n" + current_changelog

File.write('../changelog.md', new_changelog)
end

private_lane :setup_git_on_ci do
Expand Down

0 comments on commit 3be58af

Please sign in to comment.