groundskeeper-bitcore 0.33.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20af3093a5dec644b3154a1ce496399237d369ef1daeaef4a14eac5fb32f5b42
|
4
|
+
data.tar.gz: ae223a79c3b8bdbb1cda27debe7a27ed91c9f8fd8818b7b54bdb4884c5ac21e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
235
|
+
"latest tag on this repository: #{git.latest_tag_name_in_primary_branch}",
|
236
236
|
:yellow
|
237
237
|
)
|
238
238
|
end
|
@@ -432,10 +432,11 @@ module Groundskeeper
|
|
432
432
|
version_int = version.minor.to_i
|
433
433
|
current_version_int = current_version.minor.to_i
|
434
434
|
deployed_issues = []
|
435
|
-
((current_version_int
|
436
|
-
version_name = "
|
437
|
-
deployed_issues.append(jira.fetch_issues_by_fix_version(version_name))
|
435
|
+
((current_version_int)..version_int).each do |version_to_deploy|
|
436
|
+
version_name = "0.#{version_to_deploy}.0"
|
437
|
+
deployed_issues.append(jira.fetch_issues_by_fix_version(project: project, version: version_name))
|
438
438
|
end
|
439
|
+
deployed_issues.uniq!
|
439
440
|
|
440
441
|
action = if self.class.stage == PRODUCTION
|
441
442
|
Jira::DEPLOY_TO_PRODUCTION
|
data/lib/groundskeeper/git.rb
CHANGED
@@ -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
|
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,
|
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
|
data/lib/groundskeeper/jira.rb
CHANGED
@@ -68,9 +68,9 @@ module Groundskeeper
|
|
68
68
|
# :nocov:
|
69
69
|
|
70
70
|
# :nocov:
|
71
|
-
def fetch_issues_by_fix_version(version:)
|
71
|
+
def fetch_issues_by_fix_version(project:, version:)
|
72
72
|
search_path = "/rest/api/2/search"
|
73
|
-
query = "fixVersion=\"#{version}\""
|
73
|
+
query = "fixVersion=\"#{project.repo_name} #{version}\""
|
74
74
|
request_url = "#{search_path}?fields=key&jql=#{CGI.escape(query)}"
|
75
75
|
response = client.get(request_url).body
|
76
76
|
|
@@ -141,15 +141,15 @@ module Groundskeeper
|
|
141
141
|
def transition_remote_issues(transition_type, issue_ids)
|
142
142
|
issue_ids.each do |issue_id|
|
143
143
|
client.transition_issue(
|
144
|
-
issue_id: issue_id,
|
144
|
+
issue_id: issue_id[0],
|
145
145
|
transition_id: TRANSITION_IDS[transition_type]
|
146
146
|
)
|
147
147
|
end
|
148
148
|
end
|
149
149
|
|
150
150
|
# :nocov:
|
151
|
-
def fetch_issues_by_fix_version(version)
|
152
|
-
client.fetch_issues_by_fix_version(version: version)
|
151
|
+
def fetch_issues_by_fix_version(project:, version:)
|
152
|
+
client.fetch_issues_by_fix_version(project: project, version: version)
|
153
153
|
end
|
154
154
|
# :nocov:
|
155
155
|
|
@@ -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
|
-
|
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
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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)
|
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.
|
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:
|
11
|
+
date: 2025-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jira-ruby
|