Class: Rake::Gem::Maintenance::CiVersionBumpTask
- Inherits:
-
TaskLib
- Object
- TaskLib
- Rake::Gem::Maintenance::CiVersionBumpTask
- Defined in:
- lib/rake/gem/maintenance/ci_version_bump_task.rb
Overview
Defines ‘version:ci_bump` — auto-bump for CI push pipelines.
Checks whether the current version is already published at the configured registry. If yes: patch-bumps, commits with [skip ci], tags, and pushes. If no: assumes the developer already bumped and does nothing. Either way skips if the HEAD commit message contains any skip_pattern.
Usage in Rakefile:
Rake::Gem::Maintenance::CiVersionBumpTask.new do |t|
t.registry_url = 'https://gems.cbp-org.internal'
t.ca_cert_env = 'CBP_ORG_CA_CERT' # base64-encoded PEM, optional
t.push_token_env = 'FORGEJO_PUSH_TOKEN' # token for git push auth, optional
end
Instance Attribute Summary collapse
-
#ca_cert_env ⇒ Object
Returns the value of attribute ca_cert_env.
-
#git_author_email ⇒ Object
Returns the value of attribute git_author_email.
-
#git_author_name ⇒ Object
Returns the value of attribute git_author_name.
-
#push_branch ⇒ Object
Returns the value of attribute push_branch.
-
#push_token_env ⇒ Object
Returns the value of attribute push_token_env.
-
#registry_url ⇒ Object
Returns the value of attribute registry_url.
-
#skip_patterns ⇒ Object
Returns the value of attribute skip_patterns.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ CiVersionBumpTask
constructor
A new instance of CiVersionBumpTask.
Constructor Details
#initialize {|_self| ... } ⇒ CiVersionBumpTask
Returns a new instance of CiVersionBumpTask.
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/rake/gem/maintenance/ci_version_bump_task.rb', line 30 def initialize super @registry_url = "https://rubygems.org" @ca_cert_env = nil @push_token_env = nil @skip_patterns = ["[skip bump]", "[skip ci]"] @push_branch = "main" @git_author_email = "ci@cbp-org.internal" @git_author_name = "CBP-Org-CI" yield self if block_given? define_tasks end |
Instance Attribute Details
#ca_cert_env ⇒ Object
Returns the value of attribute ca_cert_env.
27 28 29 |
# File 'lib/rake/gem/maintenance/ci_version_bump_task.rb', line 27 def ca_cert_env @ca_cert_env end |
#git_author_email ⇒ Object
Returns the value of attribute git_author_email.
27 28 29 |
# File 'lib/rake/gem/maintenance/ci_version_bump_task.rb', line 27 def @git_author_email end |
#git_author_name ⇒ Object
Returns the value of attribute git_author_name.
27 28 29 |
# File 'lib/rake/gem/maintenance/ci_version_bump_task.rb', line 27 def @git_author_name end |
#push_branch ⇒ Object
Returns the value of attribute push_branch.
27 28 29 |
# File 'lib/rake/gem/maintenance/ci_version_bump_task.rb', line 27 def push_branch @push_branch end |
#push_token_env ⇒ Object
Returns the value of attribute push_token_env.
27 28 29 |
# File 'lib/rake/gem/maintenance/ci_version_bump_task.rb', line 27 def push_token_env @push_token_env end |
#registry_url ⇒ Object
Returns the value of attribute registry_url.
27 28 29 |
# File 'lib/rake/gem/maintenance/ci_version_bump_task.rb', line 27 def registry_url @registry_url end |
#skip_patterns ⇒ Object
Returns the value of attribute skip_patterns.
27 28 29 |
# File 'lib/rake/gem/maintenance/ci_version_bump_task.rb', line 27 def skip_patterns @skip_patterns end |