knapsack_pro 5.3.2 → 5.3.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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/knapsack_pro/repository_adapters/git_adapter.rb +14 -2
- data/lib/knapsack_pro/version.rb +1 -1
- data/lib/knapsack_pro.rb +1 -0
- 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: 388e3d47f2da2b0d9f1377677b912a44af5919111a86869115713488a83d84e2
|
4
|
+
data.tar.gz: '08fd59b79cc652a4045f11f24a363cac8928644a2cf2a705b766e558e77d104f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 881dc5a753a3af8ffc1320eab7dd5a50ba38909812e971a1aeb2e282a3566f27afea3b601d99784d27d9959d7cf13f2d93b8db7634f73ccfb72a82b33e4243b2
|
7
|
+
data.tar.gz: d7887b2f0bb7854b1d926f422b70ab1e4ac21904026e01863aa9b83e7a690a4df0d576f6ed863fe86e8f9dfb574db106553a7a61fc0913b1dc26ac22903c422b
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
### 5.3.3
|
4
|
+
|
5
|
+
* Fix hanging CI when `git fetch --shallow-since` takes too long
|
6
|
+
|
7
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/213
|
8
|
+
|
9
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v5.3.2...v5.3.3
|
10
|
+
|
3
11
|
### 5.3.2
|
4
12
|
|
5
13
|
* On top of 5.3.1, avoid noise to stderr when git is not available when collecting the build author
|
@@ -41,8 +41,15 @@ module KnapsackPro
|
|
41
41
|
private
|
42
42
|
|
43
43
|
def git_commit_authors
|
44
|
-
if KnapsackPro::Config::Env.ci?
|
45
|
-
|
44
|
+
if KnapsackPro::Config::Env.ci? && shallow_repository?
|
45
|
+
command = 'git fetch --shallow-since "one month ago" --quiet 2>/dev/null'
|
46
|
+
begin
|
47
|
+
Timeout.timeout(5) do
|
48
|
+
`#{command}`
|
49
|
+
end
|
50
|
+
rescue Timeout::Error
|
51
|
+
KnapsackPro.logger.debug("Skip the `#{command}` command because it took too long.")
|
52
|
+
end
|
46
53
|
end
|
47
54
|
|
48
55
|
`git log --since "one month ago" 2>/dev/null | git shortlog --summary --email 2>/dev/null`
|
@@ -52,6 +59,11 @@ module KnapsackPro
|
|
52
59
|
`git log --format="%aN <%aE>" -1 2>/dev/null`
|
53
60
|
end
|
54
61
|
|
62
|
+
def shallow_repository?
|
63
|
+
result = `git rev-parse --is-shallow-repository 2>/dev/null`
|
64
|
+
result.strip == 'true'
|
65
|
+
end
|
66
|
+
|
55
67
|
def working_dir
|
56
68
|
dir = KnapsackPro::Config::Env.project_dir
|
57
69
|
File.expand_path(dir)
|
data/lib/knapsack_pro/version.rb
CHANGED
data/lib/knapsack_pro.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knapsack_pro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.3.
|
4
|
+
version: 5.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|