* Introduce script to automate release * Rakefile levelup * Version 0.14.0 * Fix newline at end of podspec.json * Ensure we start and end on master branch And that we pull latest master before tagging * CRLF at EOF * Remove [:version] param from `release:finish` task It can be guessed from the current podspec version * Fix create_release task * Ensure we run rake via bundle exec Co-authored-by: David Jennes <djbe@users.noreply.github.com> Co-authored-by: David Jennes <djbe@users.noreply.github.com>
29 lines
539 B
Ruby
29 lines
539 B
Ruby
def colorize(string, *codes)
|
|
if `tput colors`.chomp.to_i >= 8
|
|
code = codes.join(';')
|
|
puts "\e[#{code}m" + string + "\e[0m"
|
|
else
|
|
puts string
|
|
end
|
|
end
|
|
|
|
def header(title)
|
|
puts colorize("==> #{title}...", 1, 32) # bold, green
|
|
end
|
|
|
|
def info(string)
|
|
puts colorize(string, 34) # blue
|
|
end
|
|
|
|
def release_branch(version)
|
|
"release/#{version}"
|
|
end
|
|
|
|
def replace(file, replacements)
|
|
content = File.read(file)
|
|
replacements.each do |match, replacement|
|
|
content.gsub!(match, replacement)
|
|
end
|
|
File.write(file, content)
|
|
end
|