groundskeeper-bitcore 0.34.0 → 0.35.0

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: 7c85ed53bac61c994b0e4e1ee83781a57ca26046128412199c0824fd93a95774
4
- data.tar.gz: 3a61a6eccc60d1b40a3508b28d10cc888dde680b35e59f074f221d7f53d31aae
3
+ metadata.gz: 20af3093a5dec644b3154a1ce496399237d369ef1daeaef4a14eac5fb32f5b42
4
+ data.tar.gz: ae223a79c3b8bdbb1cda27debe7a27ed91c9f8fd8818b7b54bdb4884c5ac21e4
5
5
  SHA512:
6
- metadata.gz: 6d980eba26b5dc7fd0376aa291074de4196ae75576a3460019774d6711672797541abf1d0e0943fc869bc80720c7561bbdb2c8c6ae4baac83a36d76344500b9f
7
- data.tar.gz: df07fc3671092395b4797d9a6cd3d4facaa438108841b162e773f693a01dea69bb324c183cd0ddb03d10c80ed0ae24e16ab4f7bb637babe325ac2c6eb26ae08a
6
+ metadata.gz: 5e0d01ccf871c973228cc046fe6f2975e9ab4d82275035dfdbf96d6bafb572947f7805c1c534cb4b46fb950830a207a6b7215b2d5f01bdeebb28e4181d840936
7
+ data.tar.gz: 438d08ea726015370e549f91c24db7b06b572e21ffa8d97c4965ae943a8fc38c5f79d5fbfae45ef706ebd323a112377d19cdb4b47ca77c939ad78dab5742c9d5
@@ -232,7 +232,7 @@ module Groundskeeper
232
232
 
233
233
  def announce_latest_tag
234
234
  console.say(
235
- "latest tag on this repository: #{git.latest_tag_name_across_branches}",
235
+ "latest tag on this repository: #{git.latest_tag_name_in_primary_branch}",
236
236
  :yellow
237
237
  )
238
238
  end
@@ -11,8 +11,7 @@ module Groundskeeper
11
11
  TAGS_ASC = "tag -l --sort=v:refname"
12
12
  TAGS_DESC = "tag -l --sort=-v:refname"
13
13
  LATEST_TAG_COMMIT = "#{COMMAND} rev-list --tags --max-count=1".freeze
14
- LATEST_TAG_NAME =
15
- format("describe --tags $(%<commit>s)", commit: LATEST_TAG_COMMIT)
14
+ LATEST_TAG_NAME = "tag --merged $(git branch --show-current) --sort=-creatordate | head -n 1"
16
15
  LATEST_TAG_BRANCHES =
17
16
  format("branch --contains $(%<commit>s)", commit: LATEST_TAG_COMMIT)
18
17
  LATEST_CHANGES = "log %s..HEAD --oneline"
@@ -58,7 +57,7 @@ module Groundskeeper
58
57
  git.execute(TAGS_DESC).split("\n")
59
58
  end
60
59
 
61
- def latest_tag_name_across_branches
60
+ def latest_tag_name_in_primary_branch
62
61
  git.execute(LATEST_TAG_NAME).chop
63
62
  end
64
63
 
@@ -67,7 +66,7 @@ module Groundskeeper
67
66
  end
68
67
 
69
68
  def raw_changes_since_latest_tag
70
- latest_changes = format(LATEST_CHANGES, latest_tag_name_across_branches)
69
+ latest_changes = format(LATEST_CHANGES, latest_tag_name_in_primary_branch)
71
70
 
72
71
  git.execute(latest_changes).split("\n")
73
72
  end
@@ -51,7 +51,7 @@ module Groundskeeper
51
51
  end
52
52
 
53
53
  def bumped_semantic_version(type)
54
- SemanticVersion.new(git.latest_tag_name_across_branches).bump(type)
54
+ SemanticVersion.new(git.latest_tag_name_in_primary_branch).bump(type)
55
55
  end
56
56
 
57
57
  def name
@@ -7,6 +7,7 @@ module Groundskeeper
7
7
  MINOR = "minor"
8
8
  PATCH = "patch"
9
9
  SEMANTIC_RELEASE_TYPE = { M: MAJOR, m: MINOR, p: PATCH }.freeze
10
+ WORD_NUMBER_PATTERN = /^([a-zA-Z]+)-(\d+)$/
10
11
 
11
12
  attr_reader :major, :minor, :patch
12
13
 
@@ -19,19 +20,30 @@ module Groundskeeper
19
20
  # :nocov:
20
21
 
21
22
  def initialize(version)
22
- @major, @minor, @patch = version.split(".").map(&:to_i)
23
+ if version.match(WORD_NUMBER_PATTERN)
24
+ @word = ::Regexp.last_match(1)
25
+ @number = ::Regexp.last_match(2).to_i
26
+ else
27
+ @major, @minor, @patch = version.split(".").map(&:to_i)
28
+ end
23
29
  end
24
30
 
31
+ # rubocop:disable Metrics/MethodLength
25
32
  def bump(release_type)
26
- case SEMANTIC_RELEASE_TYPE[release_type.to_sym]
27
- when MAJOR
28
- "#{major + 1}.0.0"
29
- when MINOR
30
- "#{major}.#{minor + 1}.0"
31
- when PATCH
32
- "#{major}.#{minor}.#{patch + 1}"
33
+ if @major.nil? && @minor.nil? && @patch.nil?
34
+ "#{@word}-#{@number + 1}"
35
+ else
36
+ case SEMANTIC_RELEASE_TYPE[release_type.to_sym]
37
+ when MAJOR
38
+ "#{major + 1}.0.0"
39
+ when MINOR
40
+ "#{major}.#{minor + 1}.0"
41
+ when PATCH
42
+ "#{major}.#{minor}.#{patch + 1}"
43
+ end
33
44
  end
34
45
  end
46
+ # rubocop:enable Metrics/MethodLength
35
47
 
36
48
  def >(other)
37
49
  other_version = SemanticVersion.build(other)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Groundskeeper
4
- VERSION = "0.34.0"
4
+ VERSION = "0.35.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groundskeeper-bitcore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.0
4
+ version: 0.35.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - RADD
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-24 00:00:00.000000000 Z
11
+ date: 2025-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jira-ruby