create_github_release 1.5.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.markdownlint.yml +1 -1
- data/.rubocop.yml +6 -22
- data/.yardopts +2 -0
- data/CHANGELOG.md +18 -0
- data/LICENSE.txt +1 -1
- data/README.md +6 -3
- data/Rakefile +37 -31
- data/create_github_release.gemspec +19 -10
- data/exe/create-github-release +1 -1
- data/lib/create_github_release/command_line/parser.rb +39 -100
- data/lib/create_github_release/version.rb +1 -1
- metadata +67 -18
- data/.solargraph.yml +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12600b953af47f02425eb0245d33bc425144f135e1395359028a49c220ab47eb
|
4
|
+
data.tar.gz: ef8404f682fbfb505446d4dd2f2283894f5a52315d92db28bdbece29238668e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e72d594e44e41b5c2be11228e1fb5024db9308697326052b0c570486b73f0f955af1760225c0fa92223a34f1cb2c065d04a983bced094dbdb76556bb92280c9b
|
7
|
+
data.tar.gz: 8a0f3b4e48211fbe3f57c985c6e55c68154914b21c6ff43ebc48eb67214f1cb00a4585f5db32ea58c27dd1d9453ab33311c82f9cdf81ae2143b181b01b946ff8
|
data/.markdownlint.yml
CHANGED
@@ -9,7 +9,7 @@ MD013: { line_length: 90, tables: false, code_blocks: false }
|
|
9
9
|
# Heading duplication is allowed for non-sibling headings
|
10
10
|
MD024: { siblings_only: true }
|
11
11
|
|
12
|
-
# Do not allow the specified
|
12
|
+
# Do not allow the specified trailing punctuation in a header
|
13
13
|
MD026: { punctuation: '.,;:' }
|
14
14
|
|
15
15
|
# Order list items must have a prefix that increases in numerical order
|
data/.rubocop.yml
CHANGED
@@ -1,23 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
# Output extra information for each offense to make it easier to diagnose:
|
4
|
-
DisplayCopNames: true
|
5
|
-
DisplayStyleGuide: true
|
6
|
-
ExtraDetails: true
|
7
|
-
SuggestExtensions: false
|
8
|
-
# RuboCop enforces rules depending on the oldest version of Ruby which
|
9
|
-
# your project supports:
|
10
|
-
TargetRubyVersion: 3.0
|
11
|
-
|
12
|
-
# The default max line length is 80 characters
|
13
|
-
Layout/LineLength:
|
14
|
-
Max: 120
|
1
|
+
inherit_gem:
|
2
|
+
main_branch_shared_rubocop_config: config/rubocop.yml
|
15
3
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- "*.gemspec"
|
21
|
-
|
22
|
-
Gemspec/DevelopmentDependencies:
|
23
|
-
EnforcedStyle: gemspec
|
4
|
+
AllCops:
|
5
|
+
# Pin this project to Ruby 3.1 in case the shared config above is upgraded to 3.2
|
6
|
+
# or later.
|
7
|
+
TargetRubyVersion: 3.1
|
data/.yardopts
CHANGED
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## v2.0.0 (2024-09-18)
|
9
|
+
|
10
|
+
[Full Changelog](https://github.com/main-branch/create_github_release/compare/v1.5.0..v2.0.0)
|
11
|
+
|
12
|
+
Changes since v1.5.0:
|
13
|
+
|
14
|
+
* 639dc5c Use the command_line_boss gem for CLI parsing
|
15
|
+
* 81b10ac Use shared Rubocop config
|
16
|
+
* 7f2576a Update copyright notice in this project
|
17
|
+
* 29c7b6e Update links in gemspec
|
18
|
+
* 610f216 Add Slack badge for this project in README
|
19
|
+
* 2fb5005 Use standard badges at the top of the README
|
20
|
+
* 9386029 Update yardopts with new standard options
|
21
|
+
* 35af127 Standardize YARD and Markdown Lint configurations
|
22
|
+
* 5b0cc7b Set JRuby —debug option when running tests in GitHub Actions workflows
|
23
|
+
* ec2a239 Update continuous integration and experimental ruby builds
|
24
|
+
* f4d0e93 Depend on v1 of semver_pr_label_check
|
25
|
+
|
8
26
|
## v1.5.0 (2024-09-10)
|
9
27
|
|
10
28
|
[Full Changelog](https://github.com/main-branch/create_github_release/compare/v1.4.0..v1.5.0)
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
# The create_github_release Gem
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/create_github_release.svg)](https://badge.fury.io/rb/create_github_release)
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
[![Documentation](https://img.shields.io/badge/Documentation-Latest-green)](https://rubydoc.info/gems/create_github_release/)
|
5
|
+
[![Change Log](https://img.shields.io/badge/CHANGELOG-Latest-green)](https://rubydoc.info/gems/create_github_release/file/CHANGELOG.md)
|
6
|
+
[![Build Status](https://github.com/main-branch/create_github_release/actions/workflows/continuous_integration.yml/badge.svg)](https://github.com/main-branch/create_github_release/actions/workflows/continuous_integration.yml)
|
7
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/b8c0af10b15a0ffeb1a1/maintainability)](https://codeclimate.com/github/main-branch/create_github_release/maintainability)
|
8
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/b8c0af10b15a0ffeb1a1/test_coverage)](https://codeclimate.com/github/main-branch/create_github_release/test_coverage)
|
9
|
+
[![Slack](https://img.shields.io/badge/slack-main--branch/create__github__release-yellow.svg?logo=slack)](https://main-branch.slack.com/archives/C07NG282N80)
|
7
10
|
|
8
11
|
When run in your gem's git worktree, the `create-github-release` script does the
|
9
12
|
following:
|
data/Rakefile
CHANGED
@@ -3,7 +3,11 @@
|
|
3
3
|
# The default task
|
4
4
|
|
5
5
|
desc 'Run the same tasks that the CI build will run'
|
6
|
-
|
6
|
+
if RUBY_PLATFORM == 'java'
|
7
|
+
task default: %w[spec rubocop bundle:audit build]
|
8
|
+
else
|
9
|
+
task default: %w[spec rubocop yard bundle:audit build]
|
10
|
+
end
|
7
11
|
|
8
12
|
# Bundler Audit
|
9
13
|
|
@@ -30,6 +34,11 @@ CLOBBER << 'Gemfile.lock'
|
|
30
34
|
|
31
35
|
require 'rspec/core/rake_task'
|
32
36
|
|
37
|
+
if RUBY_PLATFORM == 'java'
|
38
|
+
ENV['JAVA_OPTS'] = '-Djdk.io.File.enableADS=true'
|
39
|
+
ENV['JRUBY_OPTS'] = '--debug'
|
40
|
+
end
|
41
|
+
|
33
42
|
RSpec::Core::RakeTask.new
|
34
43
|
|
35
44
|
CLEAN << 'coverage'
|
@@ -40,47 +49,44 @@ CLEAN << 'rspec-report.xml'
|
|
40
49
|
|
41
50
|
require 'rubocop/rake_task'
|
42
51
|
|
43
|
-
RuboCop::RakeTask.new
|
44
|
-
t.options = %w[
|
45
|
-
--format progress
|
46
|
-
--format json --out rubocop-report.json
|
47
|
-
]
|
48
|
-
end
|
49
|
-
|
50
|
-
CLEAN << 'rubocop-report.json'
|
52
|
+
RuboCop::RakeTask.new
|
51
53
|
|
52
54
|
# YARD
|
53
55
|
|
54
|
-
|
55
|
-
|
56
|
-
t.files = %w[lib/**/*.rb examples/**/*]
|
57
|
-
t.stats_options = ['--list-undoc']
|
58
|
-
end
|
56
|
+
unless RUBY_PLATFORM == 'java'
|
57
|
+
# yard:build
|
59
58
|
|
60
|
-
|
61
|
-
CLEAN << 'doc'
|
59
|
+
require 'yard'
|
62
60
|
|
63
|
-
|
61
|
+
YARD::Rake::YardocTask.new('yard:build') do |t|
|
62
|
+
t.files = %w[lib/**/*.rb examples/**/*]
|
63
|
+
t.options = %w[--no-private]
|
64
|
+
t.stats_options = %w[--list-undoc]
|
65
|
+
end
|
64
66
|
|
65
|
-
|
66
|
-
|
67
|
-
sh "yardstick 'lib/**/*.rb'"
|
68
|
-
end
|
67
|
+
CLEAN << '.yardoc'
|
68
|
+
CLEAN << 'doc'
|
69
69
|
|
70
|
-
#
|
70
|
+
# yard:audit
|
71
71
|
|
72
|
-
|
72
|
+
desc 'Run yardstick to show missing YARD doc elements'
|
73
|
+
task :'yard:audit' do
|
74
|
+
sh "yardstick 'lib/**/*.rb'"
|
75
|
+
end
|
73
76
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
+
# yard:coverage
|
78
|
+
|
79
|
+
require 'yardstick/rake/verify'
|
77
80
|
|
78
|
-
|
81
|
+
Yardstick::Rake::Verify.new(:'yard:coverage') do |verify|
|
82
|
+
verify.threshold = 100
|
83
|
+
end
|
79
84
|
|
80
|
-
#
|
81
|
-
|
82
|
-
|
83
|
-
|
85
|
+
# yard
|
86
|
+
|
87
|
+
desc 'Run all YARD tasks'
|
88
|
+
task yard: %i[yard:build yard:audit yard:coverage]
|
89
|
+
end
|
84
90
|
|
85
91
|
# Additional cleanup
|
86
92
|
|
@@ -13,16 +13,17 @@ Gem::Specification.new do |spec|
|
|
13
13
|
A script that manages your gem version and creates a GitHub branch, PR, and
|
14
14
|
release for a new gem version.
|
15
15
|
DESCRIPTION
|
16
|
-
spec.homepage = 'https://github.com/main-branch/create_github_release'
|
17
16
|
spec.license = 'MIT'
|
18
|
-
spec.required_ruby_version = '>= 3.
|
17
|
+
spec.required_ruby_version = '>= 3.1.0'
|
19
18
|
|
20
19
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
21
20
|
|
21
|
+
# Project links
|
22
|
+
spec.homepage = "https://github.com/main-branch/#{spec.name}"
|
22
23
|
spec.metadata['homepage_uri'] = spec.homepage
|
23
24
|
spec.metadata['source_code_uri'] = spec.homepage
|
24
|
-
spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md"
|
25
25
|
spec.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}"
|
26
|
+
spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md"
|
26
27
|
|
27
28
|
# Specify which files should be added to the gem when it is released.
|
28
29
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
@@ -34,23 +35,31 @@ Gem::Specification.new do |spec|
|
|
34
35
|
spec.bindir = 'exe'
|
35
36
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
36
37
|
spec.require_paths = ['lib']
|
38
|
+
spec.requirements = [
|
39
|
+
'Platform: Mac, Linux, or Windows',
|
40
|
+
'Ruby: MRI 3.1 or later, TruffleRuby 24 or later, or JRuby 9.4 or later'
|
41
|
+
]
|
37
42
|
|
38
43
|
spec.add_dependency 'version_boss', '~> 0.1'
|
39
44
|
|
40
45
|
spec.add_development_dependency 'bundler-audit', '~> 0.9'
|
41
|
-
spec.add_development_dependency '
|
46
|
+
spec.add_development_dependency 'command_line_boss', '~> 0.1'
|
47
|
+
# spec.add_development_dependency 'debug', '~> 1.9'
|
48
|
+
spec.add_development_dependency 'logger', '~> 1.6'
|
49
|
+
spec.add_development_dependency 'main_branch_shared_rubocop_config', '~> 0.1'
|
42
50
|
spec.add_development_dependency 'rake', '~> 13.2'
|
43
|
-
spec.add_development_dependency 'redcarpet', '~> 3.6'
|
44
51
|
spec.add_development_dependency 'rspec', '~> 3.13'
|
45
|
-
spec.add_development_dependency 'rubocop', '~> 1.
|
52
|
+
spec.add_development_dependency 'rubocop', '~> 1.66'
|
46
53
|
spec.add_development_dependency 'simplecov', '~> 0.22'
|
47
54
|
spec.add_development_dependency 'simplecov-lcov', '~> 0.8'
|
55
|
+
spec.add_development_dependency 'simplecov-rspec', '~> 0.2'
|
48
56
|
spec.add_development_dependency 'timecop', '~> 0.9'
|
49
|
-
spec.add_development_dependency 'yard', '~> 0.9'
|
50
|
-
spec.add_development_dependency 'yardstick', '~> 0.9'
|
51
57
|
|
52
|
-
|
53
|
-
|
58
|
+
unless RUBY_PLATFORM == 'java'
|
59
|
+
spec.add_development_dependency 'redcarpet', '~> 3.6'
|
60
|
+
spec.add_development_dependency 'yard', '~> 0.9', '>= 0.9.28'
|
61
|
+
spec.add_development_dependency 'yardstick', '~> 0.9'
|
62
|
+
end
|
54
63
|
|
55
64
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
56
65
|
end
|
data/exe/create-github-release
CHANGED
@@ -25,7 +25,7 @@ def wait_for_non_nil(method, max_attempts: 10, sleep_time: 0.5)
|
|
25
25
|
result
|
26
26
|
end
|
27
27
|
|
28
|
-
options = CreateGithubRelease::CommandLine::Parser.new.parse(
|
28
|
+
options = CreateGithubRelease::CommandLine::Parser.new.parse!(ARGV).options
|
29
29
|
pp options if options.verbose
|
30
30
|
|
31
31
|
project = CreateGithubRelease::Project.new(options)
|
@@ -1,14 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'English'
|
4
|
-
require '
|
4
|
+
require 'command_line_boss'
|
5
5
|
require 'create_github_release/command_line/options'
|
6
6
|
require 'create_github_release/version'
|
7
7
|
|
8
8
|
module CreateGithubRelease
|
9
9
|
module CommandLine
|
10
|
-
# rubocop:disable Metrics/ClassLength
|
11
|
-
|
12
10
|
# Parses the options for this script
|
13
11
|
#
|
14
12
|
# @example Specify the release type
|
@@ -30,43 +28,8 @@ module CreateGithubRelease
|
|
30
28
|
#
|
31
29
|
# @api public
|
32
30
|
#
|
33
|
-
class Parser
|
34
|
-
#
|
35
|
-
#
|
36
|
-
# @example
|
37
|
-
# parser = CommandLineParser.new
|
38
|
-
#
|
39
|
-
def initialize
|
40
|
-
@option_parser = OptionParser.new
|
41
|
-
define_options
|
42
|
-
@options = CreateGithubRelease::CommandLine::Options.new
|
43
|
-
end
|
44
|
-
|
45
|
-
# Parse the command line arguements returning the options
|
46
|
-
#
|
47
|
-
# @example
|
48
|
-
# parser = CommandLineParser.new
|
49
|
-
# options = parser.parse(['major'])
|
50
|
-
#
|
51
|
-
# @param args [Array<String>] the command line arguments
|
52
|
-
#
|
53
|
-
# @return [CreateGithubRelease::CommandLine::Options] the options
|
54
|
-
#
|
55
|
-
def parse(*args)
|
56
|
-
begin
|
57
|
-
option_parser.parse!(remaining_args = args.dup)
|
58
|
-
rescue OptionParser::InvalidOption, OptionParser::MissingArgument => e
|
59
|
-
report_errors(e.message)
|
60
|
-
end
|
61
|
-
parse_remaining_args(remaining_args)
|
62
|
-
# puts options unless options.quiet
|
63
|
-
report_errors(*options.errors) unless options.valid?
|
64
|
-
options
|
65
|
-
end
|
66
|
-
|
67
|
-
private
|
68
|
-
|
69
|
-
# @!attribute [rw] options
|
31
|
+
class Parser < CommandLineBoss
|
32
|
+
# @!attribute [r] options
|
70
33
|
#
|
71
34
|
# The options to used for the create-github-release script
|
72
35
|
#
|
@@ -82,45 +45,26 @@ module CreateGithubRelease
|
|
82
45
|
#
|
83
46
|
attr_reader :options
|
84
47
|
|
85
|
-
|
86
|
-
#
|
87
|
-
# The option parser
|
88
|
-
#
|
89
|
-
# @return [OptionParser] the option parser
|
90
|
-
#
|
91
|
-
# @api private
|
92
|
-
#
|
93
|
-
attr_reader :option_parser
|
94
|
-
|
95
|
-
# Parse non-option arguments (the release type)
|
96
|
-
# @return [void]
|
97
|
-
# @api private
|
98
|
-
def parse_remaining_args(remaining_args)
|
99
|
-
options.release_type = remaining_args.shift || nil
|
100
|
-
report_errors('Too many args') unless remaining_args.empty?
|
101
|
-
end
|
48
|
+
private
|
102
49
|
|
103
|
-
#
|
104
|
-
# @return [
|
50
|
+
# Set the default options
|
51
|
+
# @return [Void]
|
105
52
|
# @api private
|
106
|
-
def
|
107
|
-
|
108
|
-
#{errors.map { |e| "ERROR: #{e}" }.join("\n")}
|
109
|
-
|
110
|
-
Use --help for usage
|
111
|
-
MESSAGE
|
53
|
+
def set_defaults
|
54
|
+
@options = CreateGithubRelease::CommandLine::Options.new
|
112
55
|
end
|
113
56
|
|
114
|
-
#
|
57
|
+
# Parse non-option arguments (the release type)
|
115
58
|
# @return [void]
|
116
59
|
# @api private
|
117
|
-
def
|
118
|
-
|
119
|
-
exit 1
|
60
|
+
def parse_arguments
|
61
|
+
options.release_type = args.shift
|
120
62
|
end
|
121
63
|
|
122
64
|
# The banner for the option parser
|
123
|
-
|
65
|
+
# @return [String] the banner
|
66
|
+
# @api private
|
67
|
+
def banner = <<~BANNER.freeze
|
124
68
|
Usage:
|
125
69
|
#{File.basename($PROGRAM_NAME)} --help | RELEASE_TYPE [options]
|
126
70
|
|
@@ -131,25 +75,11 @@ module CreateGithubRelease
|
|
131
75
|
Options:
|
132
76
|
BANNER
|
133
77
|
|
134
|
-
# Define the options for OptionParser
|
135
|
-
# @return [void]
|
136
|
-
# @api private
|
137
|
-
def define_options
|
138
|
-
# @sg-ignore
|
139
|
-
option_parser.banner = BANNER
|
140
|
-
%i[
|
141
|
-
define_help_option define_default_branch_option define_release_branch_option define_pre_option
|
142
|
-
define_pre_type_option define_remote_option define_last_release_version_option define_version_option
|
143
|
-
define_next_release_version_option define_release_pr_label_option define_changelog_path_option
|
144
|
-
define_quiet_option define_verbose_option
|
145
|
-
].each { |m| send(m) }
|
146
|
-
end
|
147
|
-
|
148
78
|
# Define the release_pr_label option which requires a value
|
149
79
|
# @return [void]
|
150
80
|
# @api private
|
151
81
|
def define_release_pr_label_option
|
152
|
-
|
82
|
+
parser.on('--release-pr-label=LABEL', 'The label to apply to the release pull request') do |label|
|
153
83
|
options.release_pr_label = label
|
154
84
|
end
|
155
85
|
end
|
@@ -158,7 +88,7 @@ module CreateGithubRelease
|
|
158
88
|
# @return [void]
|
159
89
|
# @api private
|
160
90
|
def define_pre_option
|
161
|
-
|
91
|
+
parser.on('-p', '--pre', 'Create a pre-release') do |pre|
|
162
92
|
options.pre = pre
|
163
93
|
end
|
164
94
|
end
|
@@ -168,7 +98,7 @@ module CreateGithubRelease
|
|
168
98
|
# @api private
|
169
99
|
def define_pre_type_option
|
170
100
|
description = 'Type of pre-release to create (e.g. alpha, beta, etc.)'
|
171
|
-
|
101
|
+
parser.on('-t', '--pre-type=TYPE', description) do |pre_type|
|
172
102
|
options.pre_type = pre_type
|
173
103
|
end
|
174
104
|
end
|
@@ -177,7 +107,7 @@ module CreateGithubRelease
|
|
177
107
|
# @return [void]
|
178
108
|
# @api private
|
179
109
|
def define_quiet_option
|
180
|
-
|
110
|
+
parser.on('-q', '--[no-]quiet', 'Do not show output') do |quiet|
|
181
111
|
options.quiet = quiet
|
182
112
|
end
|
183
113
|
end
|
@@ -186,7 +116,7 @@ module CreateGithubRelease
|
|
186
116
|
# @return [void]
|
187
117
|
# @api private
|
188
118
|
def define_verbose_option
|
189
|
-
|
119
|
+
parser.on('-V', '--[no-]verbose', 'Show extra output') do |verbose|
|
190
120
|
options.verbose = verbose
|
191
121
|
end
|
192
122
|
end
|
@@ -195,8 +125,8 @@ module CreateGithubRelease
|
|
195
125
|
# @return [void]
|
196
126
|
# @api private
|
197
127
|
def define_help_option
|
198
|
-
|
199
|
-
puts
|
128
|
+
parser.on_tail('-h', '--help', 'Show this message') do
|
129
|
+
puts parser
|
200
130
|
exit 0
|
201
131
|
end
|
202
132
|
end
|
@@ -205,7 +135,7 @@ module CreateGithubRelease
|
|
205
135
|
# @return [void]
|
206
136
|
# @api private
|
207
137
|
def define_default_branch_option
|
208
|
-
|
138
|
+
parser.on('--default-branch=BRANCH_NAME', 'Override the default branch') do |name|
|
209
139
|
options.default_branch = name
|
210
140
|
end
|
211
141
|
end
|
@@ -214,7 +144,7 @@ module CreateGithubRelease
|
|
214
144
|
# @return [void]
|
215
145
|
# @api private
|
216
146
|
def define_release_branch_option
|
217
|
-
|
147
|
+
parser.on('--release-branch=BRANCH_NAME', 'Override the release branch to create') do |name|
|
218
148
|
options.release_branch = name
|
219
149
|
end
|
220
150
|
end
|
@@ -223,7 +153,7 @@ module CreateGithubRelease
|
|
223
153
|
# @return [void]
|
224
154
|
# @api private
|
225
155
|
def define_remote_option
|
226
|
-
|
156
|
+
parser.on('--remote=REMOTE_NAME', "Use this remote name instead of 'origin'") do |name|
|
227
157
|
options.remote = name
|
228
158
|
end
|
229
159
|
end
|
@@ -232,8 +162,10 @@ module CreateGithubRelease
|
|
232
162
|
# @return [void]
|
233
163
|
# @api private
|
234
164
|
def define_last_release_version_option
|
235
|
-
|
236
|
-
|
165
|
+
parser.on(
|
166
|
+
'--last-release-version=VERSION',
|
167
|
+
'Use this version instead `gem-version-boss current`'
|
168
|
+
) do |version|
|
237
169
|
options.last_release_version = version
|
238
170
|
end
|
239
171
|
end
|
@@ -242,7 +174,7 @@ module CreateGithubRelease
|
|
242
174
|
# @return [void]
|
243
175
|
# @api private
|
244
176
|
def define_next_release_version_option
|
245
|
-
|
177
|
+
parser.on(
|
246
178
|
'--next-release-version=VERSION',
|
247
179
|
'Use this version instead `gem-version-boss next-RELEASE_TYPE`'
|
248
180
|
) do |version|
|
@@ -254,7 +186,7 @@ module CreateGithubRelease
|
|
254
186
|
# @return [void]
|
255
187
|
# @api private
|
256
188
|
def define_changelog_path_option
|
257
|
-
|
189
|
+
parser.on('--changelog-path=PATH', 'Use this file instead of CHANGELOG.md') do |name|
|
258
190
|
options.changelog_path = name
|
259
191
|
end
|
260
192
|
end
|
@@ -263,12 +195,19 @@ module CreateGithubRelease
|
|
263
195
|
# @return [void]
|
264
196
|
# @api private
|
265
197
|
def define_version_option
|
266
|
-
|
198
|
+
parser.on_tail('-v', '--version', 'Output the version of this script') do
|
267
199
|
puts CreateGithubRelease::VERSION
|
268
200
|
exit 0
|
269
201
|
end
|
270
202
|
end
|
203
|
+
|
204
|
+
# Validate the options once they have been parsed
|
205
|
+
# @return [Void]
|
206
|
+
# @raise [SystemExit] if the options are invalid
|
207
|
+
# @api private
|
208
|
+
def validate_options
|
209
|
+
options.errors.each { |error_message| add_error_message(error_message) }
|
210
|
+
end
|
271
211
|
end
|
272
|
-
# rubocop:enable Metrics/ClassLength
|
273
212
|
end
|
274
213
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: create_github_release
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: version_boss
|
@@ -39,47 +39,61 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.9'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: command_line_boss
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1
|
47
|
+
version: '0.1'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1
|
54
|
+
version: '0.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: logger
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '1.6'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '1.6'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: main_branch_shared_rubocop_config
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '0.1'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '0.1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '13.2'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '13.2'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: rspec
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +114,14 @@ dependencies:
|
|
100
114
|
requirements:
|
101
115
|
- - "~>"
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version: '1.
|
117
|
+
version: '1.66'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
122
|
- - "~>"
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version: '1.
|
124
|
+
version: '1.66'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: simplecov
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,6 +150,20 @@ dependencies:
|
|
136
150
|
- - "~>"
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: '0.8'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: simplecov-rspec
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0.2'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0.2'
|
139
167
|
- !ruby/object:Gem::Dependency
|
140
168
|
name: timecop
|
141
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,6 +178,20 @@ dependencies:
|
|
150
178
|
- - "~>"
|
151
179
|
- !ruby/object:Gem::Version
|
152
180
|
version: '0.9'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: redcarpet
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '3.6'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '3.6'
|
153
195
|
- !ruby/object:Gem::Dependency
|
154
196
|
name: yard
|
155
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -157,6 +199,9 @@ dependencies:
|
|
157
199
|
- - "~>"
|
158
200
|
- !ruby/object:Gem::Version
|
159
201
|
version: '0.9'
|
202
|
+
- - ">="
|
203
|
+
- !ruby/object:Gem::Version
|
204
|
+
version: 0.9.28
|
160
205
|
type: :development
|
161
206
|
prerelease: false
|
162
207
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -164,6 +209,9 @@ dependencies:
|
|
164
209
|
- - "~>"
|
165
210
|
- !ruby/object:Gem::Version
|
166
211
|
version: '0.9'
|
212
|
+
- - ">="
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: 0.9.28
|
167
215
|
- !ruby/object:Gem::Dependency
|
168
216
|
name: yardstick
|
169
217
|
requirement: !ruby/object:Gem::Requirement
|
@@ -192,7 +240,6 @@ files:
|
|
192
240
|
- ".markdownlint.yml"
|
193
241
|
- ".rspec"
|
194
242
|
- ".rubocop.yml"
|
195
|
-
- ".solargraph.yml"
|
196
243
|
- ".vscode/launch.json"
|
197
244
|
- ".yardopts"
|
198
245
|
- CHANGELOG.md
|
@@ -251,8 +298,8 @@ metadata:
|
|
251
298
|
allowed_push_host: https://rubygems.org
|
252
299
|
homepage_uri: https://github.com/main-branch/create_github_release
|
253
300
|
source_code_uri: https://github.com/main-branch/create_github_release
|
254
|
-
|
255
|
-
|
301
|
+
documentation_uri: https://rubydoc.info/gems/create_github_release/2.0.0
|
302
|
+
changelog_uri: https://rubydoc.info/gems/create_github_release/2.0.0/file/CHANGELOG.md
|
256
303
|
rubygems_mfa_required: 'true'
|
257
304
|
post_install_message:
|
258
305
|
rdoc_options: []
|
@@ -262,13 +309,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
262
309
|
requirements:
|
263
310
|
- - ">="
|
264
311
|
- !ruby/object:Gem::Version
|
265
|
-
version: 3.
|
312
|
+
version: 3.1.0
|
266
313
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
267
314
|
requirements:
|
268
315
|
- - ">="
|
269
316
|
- !ruby/object:Gem::Version
|
270
317
|
version: '0'
|
271
|
-
requirements:
|
318
|
+
requirements:
|
319
|
+
- 'Platform: Mac, Linux, or Windows'
|
320
|
+
- 'Ruby: MRI 3.1 or later, TruffleRuby 24 or later, or JRuby 9.4 or later'
|
272
321
|
rubygems_version: 3.5.16
|
273
322
|
signing_key:
|
274
323
|
specification_version: 4
|
data/.solargraph.yml
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
---
|
2
|
-
include:
|
3
|
-
- "**/*.rb"
|
4
|
-
exclude:
|
5
|
-
- spec/**/*
|
6
|
-
- test/**/*
|
7
|
-
- vendor/**/*
|
8
|
-
- ".bundle/**/*"
|
9
|
-
require: []
|
10
|
-
domains: []
|
11
|
-
reporters:
|
12
|
-
- rubocop
|
13
|
-
- require_not_found
|
14
|
-
- typecheck:strict
|
15
|
-
formatter:
|
16
|
-
rubocop:
|
17
|
-
cops: safe
|
18
|
-
except: []
|
19
|
-
only: []
|
20
|
-
extra_args: []
|
21
|
-
require_paths: []
|
22
|
-
plugins: []
|
23
|
-
max_files: 5000
|