bake-releases 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ccbecf648accb93dc35262658f110862092f97ae21003c2bbb7d16a9679824fa
4
- data.tar.gz: f2e1cad486e0f7b1fdc76b1d838b5ae5a59eb8e38c2abefb876d310076728a9a
3
+ metadata.gz: 4bb4cfc2c04ad0dc789ffb2319691472b4e2a1b068c3fc92236eeafd27710e7c
4
+ data.tar.gz: c622cf32ecd07991035ed13a8d85678abe718c875f5890c9179f1e7170b27738
5
5
  SHA512:
6
- metadata.gz: e7bdebe3ededfbd080740eca2b6a2d052a375e4d92bdae838ef29842213a464bcfb28e4dcd7d6c104297101818b759bd31f315b13a05d4bee08f4b868aedabf5
7
- data.tar.gz: d70d211bd13e3c033d725085b503f60bd587286d3709ae3b21500e77da01caf7e3767af57ddc826fa04a81d83902131f9550058f5cd2b1ebdd689c23d5b6e49c
6
+ metadata.gz: e28a151c62a7a2b147f243f68ed257f91bb987183b3f3d0ccc884ae0d0b2d9e059f57073c01af8c31c2a9fbfd006003ab6338abcbff5a407f80805fbe9e124d7
7
+ data.tar.gz: 8a5aaee9fa9b5650cb1a148e26c456bdf75606b28e0d1a5c95ecbc1d79d3043fe2aa8623ccdf69142ecdf7bf7be3673641c7218460cb3bdb6e878b582267cc72
checksums.yaml.gz.sig CHANGED
Binary file
@@ -9,24 +9,23 @@
9
9
  # Uses the `gh` command-line tool to create the release.
10
10
  # Release notes are extracted from `releases.md` for the given version; if none are found, the release is created with empty notes.
11
11
  #
12
- # @parameter tag_name [String] The tag name of the release, e.g. "v1.2.3".
13
- def release(tag_name)
12
+ # @parameter tag [String] The tag name of the release, e.g. "v1.2.3".
13
+ def release(tag)
14
14
  require "tempfile"
15
15
 
16
16
  repo = github_repo
17
- notes = release_notes(tag_name.to_s)
17
+ notes = release_notes(tag.to_s)
18
18
 
19
19
  Tempfile.create(["release-notes", ".md"]) do |file|
20
20
  file.write(notes || "")
21
21
  file.flush
22
22
 
23
23
  system(
24
- "gh", "release", "create", tag_name.to_s,
24
+ "gh", "release", "create", tag.to_s,
25
25
  "--repo", repo,
26
- "--title", tag_name.to_s,
27
- "--notes-file", file.path,
28
- "--clobber"
29
- ) or raise "Failed to create GitHub release for #{tag_name}"
26
+ "--title", tag.to_s,
27
+ "--notes-file", file.path
28
+ ) or raise "Failed to create GitHub release for #{tag}"
30
29
  end
31
30
  end
32
31
 
@@ -38,7 +37,7 @@ def github_repo
38
37
  gemspec_path = Dir.glob(File.join(context.root, "*.gemspec")).first
39
38
  raise "No gemspec found in #{context.root}" unless gemspec_path
40
39
 
41
- spec = Gem::Specification.load(gemspec_path)
40
+ spec = ::Gem::Specification.load(gemspec_path)
42
41
 
43
42
  source_uri = spec.metadata&.dig("source_code_uri") || spec.homepage
44
43
  raise "No source_code_uri or homepage found in gemspec" unless source_uri
@@ -49,13 +48,13 @@ def github_repo
49
48
  match[:repo]
50
49
  end
51
50
 
52
- def release_notes(tag_name, path = File.join(context.root, "releases.md"))
51
+ def release_notes(tag, path = File.join(context.root, "releases.md"))
53
52
  return nil unless File.exist?(path)
54
53
 
55
54
  require "markly"
56
55
  document = Markly.parse(File.read(path))
57
56
 
58
- header = document.find_header(tag_name)
57
+ header = document.find_header(tag)
59
58
  return nil unless header
60
59
 
61
60
  fragment = Markly::Node.new(:document)
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Bake
7
7
  module Releases
8
- VERSION = "0.5.3"
8
+ VERSION = "0.5.4"
9
9
  end
10
10
  end
data/readme.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Please see the [project releases](https://ioquatix.github.io/bake-releases/releases/index) for all releases.
4
4
 
5
+ ### v0.5.4
6
+
7
+ - Fix ambiguous constant name `Gem::Specification` -\> `::Gem::Specification`.
8
+
5
9
  ### v0.5.3
6
10
 
7
11
  - Don't strip whitespace from release notes.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.5.4
4
+
5
+ - Fix ambiguous constant name `Gem::Specification` -\> `::Gem::Specification`.
6
+
3
7
  ## v0.5.3
4
8
 
5
9
  - Don't strip whitespace from release notes.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bake-releases
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file