apadmi_grout 2.8.0 → 2.9.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/CHANGELOG.md +3 -0
- data/lib/apadmi/grout/utils/git_utils.rb +23 -0
- data/lib/apadmi/grout/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: fa7ac0cd2f88e84cd7dfbde2c5d303d7387e83ba83e0cc8e1d8f503599b61e01
|
4
|
+
data.tar.gz: 21e9a197f5e22264462e01394e1c1b87bb289cbc3a7f20a65c7e50b254e1754c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf9f60b7ecc1a71bc307147afdd178ac8761a4a4938c6382d51fd449297750a8d7f918a3a7eaa614631be8b989d722bbedbbdbfe89231a1803a2b868b7b3f26c
|
7
|
+
data.tar.gz: b68eac0ceac55699401b7679278f6958c0b595c4cab8999281c4bd4f0bcf10bf90dc0af31627ff7455e4dfe5eb9b7f89f21036d8abbcb0e877c058d2ba8402a8
|
data/CHANGELOG.md
CHANGED
@@ -68,6 +68,29 @@ module Apadmi
|
|
68
68
|
@@default.commit_hash
|
69
69
|
end
|
70
70
|
|
71
|
+
# Returns the hash of the last git tag which is an ancestor commit of the current HEAD and matches the given pattern
|
72
|
+
# @param pattern [String]
|
73
|
+
def self.last_ancestor_tag_hash(pattern)
|
74
|
+
@@default.last_ancestor_tag_hash(pattern)
|
75
|
+
end
|
76
|
+
|
77
|
+
def last_ancestor_tag_hash(pattern)
|
78
|
+
tag_name = last_ancestor_tag(pattern)
|
79
|
+
stdout, stderr, status = Open3.capture3("git #{@repo_path_arg} rev-list -n 1 #{tag_name}")
|
80
|
+
raise "Failed to find a tag: #{tag_name}: #{stderr}" unless status.success?
|
81
|
+
|
82
|
+
stdout.strip
|
83
|
+
end
|
84
|
+
|
85
|
+
# Returns the name of the last git tag which is an ancestor commit of the current HEAD and matches the given pattern
|
86
|
+
# @param pattern [String]
|
87
|
+
def last_ancestor_tag(pattern)
|
88
|
+
stdout, stderr, status = Open3.capture3("git #{@repo_path_arg} describe --tags --match '#{pattern}' --abbrev=0")
|
89
|
+
raise "Failed to find a tag matching pattern: #{pattern}: #{stderr}" unless status.success?
|
90
|
+
|
91
|
+
stdout.strip
|
92
|
+
end
|
93
|
+
|
71
94
|
# Gets the number of commits accessible from HEAD treating the history as a graph.
|
72
95
|
# See more details here: https://git-scm.com/docs/git-rev-list
|
73
96
|
# @return [String] The number of commits
|
data/lib/apadmi/grout/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apadmi_grout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Apadmi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-05-
|
11
|
+
date: 2025-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|