envirobly 1.8.0 → 1.8.1
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/envirobly/cli/main.rb +16 -0
- data/lib/envirobly/git.rb +14 -0
- data/lib/envirobly/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f069dc6d95c23a6de8153725e9079eb5bbd4a5c1d7607e7617e1f8bd98c1acc
|
4
|
+
data.tar.gz: 98dc46266dcf5fab8fb3b11da3ef5601b75038b4551c88002392696e0f07eb48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a3164960b7f76ae4ecbe36d3f12427750b550846a591fad82d3598668ce10e755c7b7886887ab71be327fbde4abf9a43b52e5d8d9b30fe3033f0065a28acf25
|
7
|
+
data.tar.gz: 4399aef0cb3c883af5441e6e5cfcdf986f2712968a73dfe40baf34c7e017b355837d7b6478ed165c0f7d2a3308626c2ff82b5d33274f4fd91631e923af827b9c
|
data/lib/envirobly/cli/main.rb
CHANGED
@@ -88,6 +88,22 @@ class Envirobly::Cli::Main < Envirobly::Base
|
|
88
88
|
exit 1
|
89
89
|
end
|
90
90
|
|
91
|
+
if commit.uncommited_changes?
|
92
|
+
say "You have uncommited changes in this repository:"
|
93
|
+
say
|
94
|
+
commit.uncommited_changes.each do |path|
|
95
|
+
say " #{path}"
|
96
|
+
end
|
97
|
+
say
|
98
|
+
say "These won't be deployed. ", :red
|
99
|
+
say "Instead contents of commit #{commit.short_ref} will be."
|
100
|
+
say
|
101
|
+
unless ask("Continue deploying? [y/N]")[0]&.downcase == "y"
|
102
|
+
say "Cancelled"
|
103
|
+
exit
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
91
107
|
Envirobly::AccessToken.new(shell:).require!
|
92
108
|
|
93
109
|
deployment = Envirobly::Deployment.new(
|
data/lib/envirobly/git.rb
CHANGED
@@ -16,4 +16,18 @@ class Envirobly::Git
|
|
16
16
|
def current_branch
|
17
17
|
git("branch --show-current").stdout.strip
|
18
18
|
end
|
19
|
+
|
20
|
+
def uncommited_changes
|
21
|
+
@uncommited_changes ||= git("status --porcelain").stdout.lines.map do |line|
|
22
|
+
_, path = line.split(" ", 2)
|
23
|
+
|
24
|
+
next if path.start_with?("#{Envirobly::Config::DIR}/")
|
25
|
+
|
26
|
+
path
|
27
|
+
end.compact
|
28
|
+
end
|
29
|
+
|
30
|
+
def uncommited_changes?
|
31
|
+
uncommited_changes.any?
|
32
|
+
end
|
19
33
|
end
|
data/lib/envirobly/version.rb
CHANGED