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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cdf1d8c97869fe6d1134df6ffbcfd3541970efa673b81074d7f12ec69ec24f8a
4
- data.tar.gz: 1a6b73ecf3ce8601311e3ba018300d96914a8d313efd9012feb4c24b0563beef
3
+ metadata.gz: f5c8080ada46b84614702d417ff2459410232056d0b3092c70eb5e0572cf233a
4
+ data.tar.gz: 49923cc2bde751559f8fdf3f51c661ba08be988717af25b761dd36a87ad3f24c
5
5
  SHA512:
6
- metadata.gz: 6a98e46c84082ddfaf476b62b4b7e7452651e7ab815697ed12f15611c437204e1bf3fdf2c13973bfdae619eb3df14fb1e945879f26b2ae479304364232370668
7
- data.tar.gz: 4bae74ce05eb65f128c8b5d1a60672ef200bdc291de0033c62ad5a56ae02f76855937cd323729130b00a46d061dc93854ffe90f69192719faccdf76516ef2d63
6
+ metadata.gz: 805fee3264808fe7a76f6fb5811be7ecc80056395da5808a89e574a3ab33b15e56e741846a1065d6480d134575c948691d1c420f1b541a953dcba0030e20bd0b
7
+ data.tar.gz: 6a3f97c3a556763c316c6d0cc7bc10908b7e7a11117a0c24d444a42e8c1166b66a7e948c259a8d2300f073a51b1eaf74453274b9a8d6d33bd6da811ddda1c8c1
@@ -70,9 +70,43 @@ def release(*arguments, **options)
70
70
  release = context.lookup('bundler:release')
71
71
  helper = release.instance.helper
72
72
 
73
- helper.guard_clean
73
+ changes = readlines("git", "status", "--porcelain")
74
74
 
75
- increment(*arguments, **options)
76
-
77
- release.call
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
@@ -22,6 +22,6 @@
22
22
 
23
23
  module Bake
24
24
  module Bundler
25
- VERSION = "0.3.3"
25
+ VERSION = "0.3.4"
26
26
  end
27
27
  end
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.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: 2020-09-02 00:00:00.000000000 Z
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.1.2
72
+ rubygems_version: 3.2.15
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: Provides recipes for bundler.