bake-releases 0.5.2 → 0.5.3

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: accca7fae865f220a1eda50ec7beb15e2b1964628a9ecbe9cf46be309342b6d3
4
- data.tar.gz: a71a702c454169ed697fcb1e9bb8dcda6d5bcca285b21bf7bb7bd405f63491e8
3
+ metadata.gz: ccbecf648accb93dc35262658f110862092f97ae21003c2bbb7d16a9679824fa
4
+ data.tar.gz: f2e1cad486e0f7b1fdc76b1d838b5ae5a59eb8e38c2abefb876d310076728a9a
5
5
  SHA512:
6
- metadata.gz: 1d48f11f986d6ed468d3e096b2e900acd13d6d29f6f39df9fa558667e88227f81f05857b2a8cfa599270eb44d94b5dd4b585236f2669959a0a8a6137c7d565d9
7
- data.tar.gz: d8eafa676a6c5f96f1d141974c51e563d0ebd6f0911e6208c6ca2c30ae1d9cf18ca9e636f4f7b9617781f049d34ab9cd45eb76a41d05ffa475ebc94d77d5b227
6
+ metadata.gz: e7bdebe3ededfbd080740eca2b6a2d052a375e4d92bdae838ef29842213a464bcfb28e4dcd7d6c104297101818b759bd31f315b13a05d4bee08f4b868aedabf5
7
+ data.tar.gz: d70d211bd13e3c033d725085b503f60bd587286d3709ae3b21500e77da01caf7e3767af57ddc826fa04a81d83902131f9550058f5cd2b1ebdd689c23d5b6e49c
checksums.yaml.gz.sig CHANGED
Binary file
@@ -9,23 +9,24 @@
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 [String] The tag name of the release, e.g. "v1.2.3".
13
- def release(tag)
12
+ # @parameter tag_name [String] The tag name of the release, e.g. "v1.2.3".
13
+ def release(tag_name)
14
14
  require "tempfile"
15
15
 
16
16
  repo = github_repo
17
- notes = release_notes(tag.to_s)
17
+ notes = release_notes(tag_name.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.to_s,
24
+ "gh", "release", "create", tag_name.to_s,
25
25
  "--repo", repo,
26
- "--title", tag.to_s,
27
- "--notes-file", file.path
28
- ) or raise "Failed to create GitHub release for #{tag}"
26
+ "--title", tag_name.to_s,
27
+ "--notes-file", file.path,
28
+ "--clobber"
29
+ ) or raise "Failed to create GitHub release for #{tag_name}"
29
30
  end
30
31
  end
31
32
 
@@ -37,7 +38,7 @@ def github_repo
37
38
  gemspec_path = Dir.glob(File.join(context.root, "*.gemspec")).first
38
39
  raise "No gemspec found in #{context.root}" unless gemspec_path
39
40
 
40
- spec = ::Gem::Specification.load(gemspec_path)
41
+ spec = Gem::Specification.load(gemspec_path)
41
42
 
42
43
  source_uri = spec.metadata&.dig("source_code_uri") || spec.homepage
43
44
  raise "No source_code_uri or homepage found in gemspec" unless source_uri
@@ -48,13 +49,13 @@ def github_repo
48
49
  match[:repo]
49
50
  end
50
51
 
51
- def release_notes(tag, path = File.join(context.root, "releases.md"))
52
+ def release_notes(tag_name, path = File.join(context.root, "releases.md"))
52
53
  return nil unless File.exist?(path)
53
54
 
54
55
  require "markly"
55
56
  document = Markly.parse(File.read(path))
56
57
 
57
- header = document.find_header(tag)
58
+ header = document.find_header(tag_name)
58
59
  return nil unless header
59
60
 
60
61
  fragment = Markly::Node.new(:document)
@@ -77,5 +78,5 @@ def release_notes(tag, path = File.join(context.root, "releases.md"))
77
78
  end
78
79
  end
79
80
 
80
- fragment.to_markdown.strip
81
+ fragment.to_markdown
81
82
  end
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Bake
7
7
  module Releases
8
- VERSION = "0.5.2"
8
+ VERSION = "0.5.3"
9
9
  end
10
10
  end
data/readme.md CHANGED
@@ -2,6 +2,11 @@
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.3
6
+
7
+ - Don't strip whitespace from release notes.
8
+ - It breaks markdown formatting (this is a test).
9
+
5
10
  ### v0.5.2
6
11
 
7
12
  - Remove `--clobber` from GitHub release - it was a hallucination and doesn't exist.
data/releases.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Releases
2
2
 
3
+ ## v0.5.3
4
+
5
+ - Don't strip whitespace from release notes.
6
+ - It breaks markdown formatting (this is a test).
7
+
3
8
  ## v0.5.2
4
9
 
5
10
  - Remove `--clobber` from GitHub release - it was a hallucination and doesn't exist.
data.tar.gz.sig CHANGED
@@ -1,5 +1,4 @@
1
- ���9��x+*
2
- ���h
3
- ��X��
4
- �����ii|kǥa|<R+���.���eh䛾�Y,|�9�f���nk[��0�}�j��}p
5
- ��@�F�h�|ټ����G�ZW�^#[ �Ҽn�܍o���.B��4���リߴY:�2��;����q*�9�.-nF�^ P�O���B�W^�o<�����-!�@�'��a�9�^9��~�!��~)�����37i�����܊�,�%.���˱�q/6l
1
+
2
+ � �&K��"^�;\��l��
3
+ Η��ru��%v']�X��P����L�>Z;"�=v�7�p�i�U���>h�~q�E�_�ϳ��^�,l�)FFұ�.A)�gȘ�hn:�
4
+ }�����-��[ʔ��-;�-4`S�,�����k��G{5b��*P��T��KDPUk�6_��f�����E���u)Y21�{���-@��LF2�S�߹�I�Ȓ�gz�,������w�e��˗�̧�#}��^�5A۫��CR��n���� ��F�����
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.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file