lib/git_helper.rb in cartup-0.1.7 vs lib/git_helper.rb in cartup-0.1.7.1

- old
+ new

@@ -1,28 +1,29 @@ require 'cart_logger' -class GitHelper +module CartBinaryUploader + class GitHelper - def tag_to version - CartLogger.log_info "Tagging version to: #{version}" - begin - cmd = "git tag -f #{version}" - exec(cmd) - CartLogger.log_info 'Version tagged' - rescue - CartLogger.log_error 'Problem to generate tag on git' + def tag_to(version) + CartLogger.log_info "Tagging version to: #{version}" + begin + cmd = "git tag -f #{version}" + exec(cmd) + CartLogger.log_info 'Version tagged' + rescue + CartLogger.log_error 'Problem to generate tag on git' + end end - end - def push - CartLogger.log_info 'Pushing tag to Git ' - begin - cmd = 'git push --tags' - exec( cmd ) - CartLogger.log_info 'Tag pushed' - rescue - CartLogger.log_error 'Problem to push tag on git' - end + def push + CartLogger.log_info 'Pushing tag to Git ' + begin + cmd = 'git push --tags' + exec( cmd ) + CartLogger.log_info 'Tag pushed' + rescue + CartLogger.log_error 'Problem to push tag on git' + end + end end - -end \ No newline at end of file +end