Class: TestSuiteSplitter::Release

Inherits:
Object
  • Object
show all
Defined in:
lib/test_suite_splitter/release.rb

Constant Summary collapse

VERSION_FILE =
File.expand_path("../../VERSION", __dir__)
GEMSPEC_FILE =
"test_suite_splitter.gemspec".freeze
MASTER_BRANCH =
"master".freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(part:) ⇒ Release

Returns a new instance of Release.



13
14
15
# File 'lib/test_suite_splitter/release.rb', line 13

def initialize(part:)
  @part = part.to_sym
end

Class Method Details

.call(part: :patch) ⇒ Object



9
10
11
# File 'lib/test_suite_splitter/release.rb', line 9

def self.call(part: :patch)
  new(part: part).call
end

Instance Method Details

#callObject



17
18
19
20
21
22
23
24
25
# File 'lib/test_suite_splitter/release.rb', line 17

def call
  next_version = bumped_version
  write_version(next_version)
  run("git", "commit", "VERSION", GEMSPEC_FILE, "-m", "Release #{next_version}")
  run("git", "push", "origin", MASTER_BRANCH)
  run("gem", "build", GEMSPEC_FILE)
  run("gem", "push", gem_file_name(next_version))
  next_version
end