sct 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/sct/lib/sct/commands/dev.rb +9 -7
- data/sct/lib/sct/version.rb +1 -1
- 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: ea8384d7d7c3ab04eb3d184f66953b6f4cc4ce7e669da1ce82533d8964fa2f3a
|
4
|
+
data.tar.gz: 45e6800f8369e921f19452c191f27c9ced727676923952590fc9af8ad9bad558
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e87a61ac439d0e0737963d42bba9f81e0cb43b529fa78a6d1e638e56356760d050daa3fbb84dad74f8ba550277d2cd59a18434996d9cf04018ec21ba57776594
|
7
|
+
data.tar.gz: 8d0bd664311e72d1b980fb0485c90d3da29ce302f2d2045df76595ca0d9747811d4732fe70974c68d39aa3a9675338434cfcbbf3079335ed54e1b1a136d3830b
|
data/sct/lib/sct/commands/dev.rb
CHANGED
@@ -10,12 +10,12 @@ module Sct
|
|
10
10
|
exit 1
|
11
11
|
end
|
12
12
|
|
13
|
-
def dc command
|
14
|
-
system "docker-compose
|
13
|
+
def dc command, env = {}
|
14
|
+
system env, "docker-compose #{command}"
|
15
15
|
end
|
16
16
|
|
17
|
-
def
|
18
|
-
|
17
|
+
def dc_dev command, env = {}
|
18
|
+
dc "-f #{@@file} #{command}", env
|
19
19
|
end
|
20
20
|
|
21
21
|
def manifest
|
@@ -38,12 +38,14 @@ module Sct
|
|
38
38
|
container = service_spec["container_name"]
|
39
39
|
command = service_spec["command"] || ""
|
40
40
|
|
41
|
+
env = { "PUID" => `id -u`.chomp, "PGID" => `id -g`.chomp }
|
42
|
+
|
41
43
|
if options.pull
|
42
|
-
return unless
|
44
|
+
return unless dc_dev "pull"
|
43
45
|
end
|
44
46
|
|
45
47
|
if options.build
|
46
|
-
return unless
|
48
|
+
return unless dc_dev "build #{options.pull ? "--pull" : ""}", env
|
47
49
|
end
|
48
50
|
|
49
51
|
if options.pull or options.build
|
@@ -52,7 +54,7 @@ module Sct
|
|
52
54
|
|
53
55
|
return unless dc "rm --stop --force #{service}"
|
54
56
|
|
55
|
-
|
57
|
+
dc_dev "run --rm --service-ports --name #{container} #{service} #{command}", env
|
56
58
|
|
57
59
|
dc "up --detach #{service}"
|
58
60
|
end
|
data/sct/lib/sct/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reshad Farid
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|