bake-bundler 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bake/bundler/release.rb +38 -4
- data/lib/bake/bundler/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5c8080ada46b84614702d417ff2459410232056d0b3092c70eb5e0572cf233a
|
4
|
+
data.tar.gz: 49923cc2bde751559f8fdf3f51c661ba08be988717af25b761dd36a87ad3f24c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 805fee3264808fe7a76f6fb5811be7ecc80056395da5808a89e574a3ab33b15e56e741846a1065d6480d134575c948691d1c420f1b541a953dcba0030e20bd0b
|
7
|
+
data.tar.gz: 6a3f97c3a556763c316c6d0cc7bc10908b7e7a11117a0c24d444a42e8c1166b66a7e948c259a8d2300f073a51b1eaf74453274b9a8d6d33bd6da811ddda1c8c1
|
data/bake/bundler/release.rb
CHANGED
@@ -70,9 +70,43 @@ def release(*arguments, **options)
|
|
70
70
|
release = context.lookup('bundler:release')
|
71
71
|
helper = release.instance.helper
|
72
72
|
|
73
|
-
|
73
|
+
changes = readlines("git", "status", "--porcelain")
|
74
74
|
|
75
|
-
|
76
|
-
|
77
|
-
|
75
|
+
if changes.any?
|
76
|
+
puts "Uncommitted modifications detected:"
|
77
|
+
changes.each do |change|
|
78
|
+
puts change
|
79
|
+
end
|
80
|
+
else
|
81
|
+
last_commit = readlines("git", "log", "-1", "--oneline").first
|
82
|
+
|
83
|
+
unless last_commit =~ /version bump|bump version/i
|
84
|
+
increment(*arguments, **options)
|
85
|
+
end
|
86
|
+
|
87
|
+
release.call
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
def shell(*arguments)
|
92
|
+
IO.pipe do |input, output|
|
93
|
+
pid = Process.spawn(*arguments, out: output)
|
94
|
+
output.close
|
95
|
+
|
96
|
+
begin
|
97
|
+
yield input
|
98
|
+
ensure
|
99
|
+
pid, status = Process.wait2(pid)
|
100
|
+
|
101
|
+
unless status.success?
|
102
|
+
raise "Failed to execute #{arguments} -> #{status}"
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
def readlines(*arguments)
|
109
|
+
shell(*arguments) do |output|
|
110
|
+
return output.readlines
|
111
|
+
end
|
78
112
|
end
|
data/lib/bake/bundler/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bake-bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bake
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.
|
72
|
+
rubygems_version: 3.2.15
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: Provides recipes for bundler.
|