Sha256: 29202d522b376513abc4b9c2e9a08de66660dda6707e8ab7538c162c617e8fce

Contents?: true

Size: 575 Bytes

Versions: 45

Compression:

Stored size: 575 Bytes

Contents

module Prick
  module SubCommand
    def self.release(kind)
      constrain kind, :major, :minor, :patch

      Git.clean? or raise "Won't release: Repository is dirty"
      Git.synchronized? or raise "Won't release: Repository is not synchronized with origin"

      version = Prick.state.version.increment!(kind).to_s
      Prick.state.save

      Git.add(Prick.state.file)
      Git.add(Prick.state.schema_file)
      Git.commit "Release #{version}"
      Git.tag.create "v#{version}"
      Git.branch.create version
      Git.push

      puts version
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
prick-0.20.6 lib/subcommand/prick-release.rb
prick-0.20.5 lib/subcommand/prick-release.rb
prick-0.20.4 lib/subcommand/prick-release.rb
prick-0.20.2 lib/subcommand/prick-release.rb
prick-0.20.1 lib/subcommand/prick-release.rb