Module: Releasetool::Util
Constant Summary collapse
- DIR =
"release_notes"
- VERSION_FILE =
rails out of box
ENV['RELEASETOOL_VERSION_FILE'] || "config/initializers/00-version.rb"
- TEMPLATE_FILE =
relative to DIR
"__TEMPLATE__.md"
- RELEASE_MARKER_FILE =
should be a config var
".RELEASE_NEW_VERSION"
Instance Method Summary collapse
Instance Method Details
#guarded_system(command) ⇒ Object
18 19 20 21 |
# File 'lib/releasetool/util.rb', line 18 def guarded_system(command) puts command system(command) or raise Thor::Error.new("Couldn't '#{command}'") end |
#remove_stored_version ⇒ Object
14 15 16 |
# File 'lib/releasetool/util.rb', line 14 def remove_stored_version guarded_system("rm #{RELEASE_MARKER_FILE}") if File.exist?(RELEASE_MARKER_FILE) end |
#stored_version ⇒ Object
9 10 11 12 |
# File 'lib/releasetool/util.rb', line 9 def stored_version fail Thor::Error.new("No stored version... did you forget to do release start?") unless File.exist?(RELEASE_MARKER_FILE) File.read(RELEASE_MARKER_FILE).strip end |