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 +4 -4
- data/lib/groundskeeper/commands.rb +1 -1
- data/lib/groundskeeper/git.rb +3 -4
- data/lib/groundskeeper/repository.rb +1 -1
- data/lib/groundskeeper/semantic_version.rb +20 -8
- data/lib/groundskeeper/version.rb +1 -1
- metadata +2 -2
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
|
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
|
@@ -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
|