create_github_release 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.vscode/settings.json +7 -0
- data/CHANGELOG.md +11 -0
- data/README.md +5 -0
- data/create_github_release.gemspec +1 -0
- data/lib/create_github_release/assertions/local_release_branch_does_not_exist.rb +5 -3
- data/lib/create_github_release/assertions/local_release_tag_does_not_exist.rb +1 -1
- data/lib/create_github_release/changelog.rb +15 -6
- data/lib/create_github_release/version.rb +1 -1
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f086029c9ddf7585de3b2872c59a6d6b4d5449038327cc26703a5dcf31fc5302
|
4
|
+
data.tar.gz: 5c3eba003d79b8c676b8040f1fd359eb1b9a0271c873d70d930cd283eda743bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 101af2b61d0a4a78b9ad776bf265981152a11134170c67133910e7f7ab3081f169bc5361b490dda4c5a218c2b46e2a22812a30613582d879ffc7080d058225f5
|
7
|
+
data.tar.gz: 6cb1bbdcaa1bc974ef0a684648fb82df1be00ff67de2d50503130ce642bd3f0022935d77a2fdd2af7c4bbd992bde05167e48142d9a3b048ff5b779cd63f57a70
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,17 @@ 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
|
+
## v0.2.1 (2022-11-16)
|
9
|
+
|
10
|
+
[Full Changelog](https://github.com/main-branch/create_github_release/compare/v0.2.0...v0.2.1)
|
11
|
+
|
12
|
+
* 14b04ec Normalize local release branch and local release tag assertions' (#25)
|
13
|
+
* 025fa29 Refactor LocalReleaseBranchDoesNotExist#assert (#24)
|
14
|
+
* 7880c89 Further reduce the complexity of Changelog@to_s (#21)
|
15
|
+
* 2aa335e Fix high cognitive complexity of Changelog#to_s (#20)
|
16
|
+
* 42c263a Add CodeClimate badges and test coverage reporting (#19)
|
17
|
+
* 904d6cb Release v0.2.0
|
18
|
+
|
8
19
|
## v0.2.0 (2022-11-15)
|
9
20
|
|
10
21
|
[Full Changelog](https://github.com/main-branch/create_github_release/compare/v0.1.0...v0.2.0)
|
data/README.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# The create_github_release Gem
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/create_github_release.svg)](https://badge.fury.io/rb/create_github_release)
|
4
|
+
[![Build Status](https://github.com/main-branch/create_github_release/workflows/Ruby/badge.svg?branch=main)](https://github.com/main-branch/create_github_release/actions?query=workflow%3ARuby)
|
5
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/b8c0af10b15a0ffeb1a1/maintainability)](https://codeclimate.com/github/main-branch/create_github_release/maintainability)
|
6
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/b8c0af10b15a0ffeb1a1/test_coverage)](https://codeclimate.com/github/main-branch/create_github_release/test_coverage)
|
7
|
+
|
3
8
|
Create a GitHub release for a new gem version.
|
4
9
|
|
5
10
|
To create a new GitHub release for a gem, run the following from the top level
|
@@ -38,6 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
spec.add_development_dependency 'rspec', '~> 3.10'
|
39
39
|
spec.add_development_dependency 'rubocop', '~> 1.36'
|
40
40
|
spec.add_development_dependency 'simplecov', '~> 0.21'
|
41
|
+
spec.add_development_dependency 'simplecov-lcov', '~> 0.8'
|
41
42
|
spec.add_development_dependency 'solargraph', '~> 0.47'
|
42
43
|
spec.add_development_dependency 'yard', '~> 0.9'
|
43
44
|
spec.add_development_dependency 'yardstick', '~> 0.9'
|
@@ -31,11 +31,13 @@ module CreateGithubRelease
|
|
31
31
|
def assert
|
32
32
|
print "Checking that local branch ' #{options.branch}' does not exist..."
|
33
33
|
|
34
|
-
|
34
|
+
branches = `git branch --list "#{options.branch}"`.chomp
|
35
|
+
error 'Could not list branches' unless $CHILD_STATUS.success?
|
36
|
+
|
37
|
+
if branches == ''
|
35
38
|
puts 'OK'
|
36
39
|
else
|
37
|
-
error
|
38
|
-
error "'#{options.branch}' already exists."
|
40
|
+
error "Local branch '#{options.branch}' already exists"
|
39
41
|
end
|
40
42
|
end
|
41
43
|
end
|
@@ -291,16 +291,25 @@ module CreateGithubRelease
|
|
291
291
|
# @return [String] The changelog with the new release details
|
292
292
|
#
|
293
293
|
def to_s
|
294
|
-
|
295
|
-
changelog << "#{front_matter}\n\n" unless front_matter.empty?
|
296
|
-
changelog << release_header
|
297
|
-
changelog << release_description
|
298
|
-
changelog << "\n#{body}\n" unless body.empty?
|
299
|
-
end
|
294
|
+
formatted_front_matter + release_header + release_description + formatted_body
|
300
295
|
end
|
301
296
|
|
302
297
|
private
|
303
298
|
|
299
|
+
# The front matter formatted to insert into the changelog
|
300
|
+
# @return [String] The front matter formatted to insert into the changelog
|
301
|
+
# @api private
|
302
|
+
def formatted_front_matter
|
303
|
+
front_matter.empty? ? '' : "#{front_matter}\n\n"
|
304
|
+
end
|
305
|
+
|
306
|
+
# The body formatted to insert into the changelog
|
307
|
+
# @return [String] The body formatted to insert into the changelog
|
308
|
+
# @api private
|
309
|
+
def formatted_body
|
310
|
+
body.empty? ? '' : "\n#{body}\n"
|
311
|
+
end
|
312
|
+
|
304
313
|
# The index of the line in @lines where the front matter begins
|
305
314
|
# @return [Integer] The index of the line in @lines where the front matter begins
|
306
315
|
# @api private
|
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: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bump
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.21'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov-lcov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.8'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.8'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: solargraph
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -161,6 +175,7 @@ files:
|
|
161
175
|
- ".markdownlint.yml"
|
162
176
|
- ".rspec"
|
163
177
|
- ".rubocop.yml"
|
178
|
+
- ".vscode/settings.json"
|
164
179
|
- ".yardopts"
|
165
180
|
- CHANGELOG.md
|
166
181
|
- Gemfile
|