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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e6005245f891cfc1cee6078dfd201ba7662f1beff0d462452e09b5b406eb7f8
4
- data.tar.gz: e1ebac83b39461529d6eb06d8b92f4d275bb8225b4868bd97e41104a085dcd67
3
+ metadata.gz: 9f069dc6d95c23a6de8153725e9079eb5bbd4a5c1d7607e7617e1f8bd98c1acc
4
+ data.tar.gz: 98dc46266dcf5fab8fb3b11da3ef5601b75038b4551c88002392696e0f07eb48
5
5
  SHA512:
6
- metadata.gz: 696c939aff4ab4047f2eea626d23f381ea364992220a96533a9282946aa3c1ef30915a218ee64776137c7cf4897f723d86476448ef26c8fe9392f6e491ec593e
7
- data.tar.gz: 81fcd2a06ce9a82a28a98eebf07f5ed40caa37415cbbaf94103d8fc65e6724950f7a06ed0c27e5a691d1b43777d64fb71170b043fefb0135641573f6039c0422
6
+ metadata.gz: 1a3164960b7f76ae4ecbe36d3f12427750b550846a591fad82d3598668ce10e755c7b7886887ab71be327fbde4abf9a43b52e5d8d9b30fe3033f0065a28acf25
7
+ data.tar.gz: 4399aef0cb3c883af5441e6e5cfcdf986f2712968a73dfe40baf34c7e017b355837d7b6478ed165c0f7d2a3308626c2ff82b5d33274f4fd91631e923af827b9c
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Envirobly
4
- VERSION = "1.8.0"
4
+ VERSION = "1.8.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: envirobly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Starsi