Skip to content

Commit

Permalink
added ability to update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
berk committed Dec 10, 2015
1 parent 5df13ee commit 5394cc4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions bin/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,22 @@ def increment_version
file.write(version_file)
end

update_readme(current_version, new_version)

@version_file = nil
@version = nil
end

def update_readme
md_file_path = './README.md'
md_file = File.read(md_file_path)
previous_version = md_file.match(/"translationexchange\/tml"\s*:\s*"([^"]*)"/)[1]
md_file.gsub!(previous_version, version)
File.open(md_file_path, 'w') do |file|
file.write(md_file)
end
end

puts "\nBuilding tml-php #{version}..."

execute('phpunit')
Expand All @@ -45,6 +57,7 @@ if ARGV.include?('release')

execute('git checkout develop')

update_readme
increment_version
execute("git add #{version_file_path}")
execute("git commit -m 'Updated version to #{version}'")
Expand Down

0 comments on commit 5394cc4

Please sign in to comment.