Sha256: e59bcaecce52db5ef895bc650b635dab57ad24d1b2bbfe020372b9be6bd0a71f

Contents?: true

Size: 567 Bytes

Versions: 4

Compression:

Stored size: 567 Bytes

Contents

module Bozo::Hooks

  # Hook to tag a git repository when a release is published from a build
  # server.
  class GitTagRelease

    def post_publish
      return unless build_server?
      log_info "Tagging repository for release #{version}"

      tag_name = "rel-#{version}"

      if `git tag`.split("\n").include? tag_name
        raise Bozo::ConfigurationError.new "The tag #{tag_name} already exists"
      end

      execute_command :git, ['git', 'tag', tag_name]
      execute_command :git, ['git', 'push', '--tags']
    end

  end

end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
bozo-scripts-0.1.11 lib/bozo/hooks/git_tag_release.rb
bozo-scripts-0.1.6 lib/bozo/hooks/git_tag_release.rb
iisconfig-0.0.1.pre2 build/bundler/ruby/1.9.1/bundler/gems/bozo-scripts-950046ad1602/lib/bozo/hooks/git_tag_release.rb
iisconfig-0.0.1.pre1 build/bundler/ruby/1.9.1/bundler/gems/bozo-scripts-950046ad1602/lib/bozo/hooks/git_tag_release.rb