devkitkat 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +3 -5
- data/lib/devkitkat/command.rb +5 -17
- data/lib/devkitkat/main.rb +1 -5
- data/lib/devkitkat/service.rb +10 -11
- data/lib/devkitkat/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: 9503c19e647f80c25ed049cc5ff96089b903a953d5b42be1da32788236d6d2f2
|
4
|
+
data.tar.gz: 07f56dbc33f4a31bd5554148aef406d6ddd58ca0c3d690a630cba0fdb91ce175
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed82299c1adda7c574f7af3d007bea9fda838d98a98b9da77736870d0b9a528f30bcbc44e09ffc1568e1b6cbe750c77c71ff13fe3259b0b70ea5406d6ec3aba2
|
7
|
+
data.tar.gz: 44cd63fe05a894b2b98c8a2207c98558bea28799f46315d86ccc6ecb9ee2c06b9b004fb7090122238be4a1dbcf15bf4020027c789bd2b5c061ec3d73daf475ca
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -163,10 +163,8 @@ Options:
|
|
163
163
|
-p, --path PATH The root path of the .devkitkat.yml
|
164
164
|
--exclude SERVICE Exclude serviced from the specified target
|
165
165
|
-e, --env-var VARIABLE additional environment variables
|
166
|
-
-d, --
|
167
|
-
-
|
168
|
-
-b, --branch BRANCH Git branch
|
169
|
-
-t, --tty TTY mode. In this mode, log won't be emitted.
|
166
|
+
-d, --debug Debug mode
|
167
|
+
-i, --interactive Interactive mode. STDOUT is streamed in console.
|
170
168
|
-v, --version Show version
|
171
169
|
-h, --help Show help
|
172
170
|
|
@@ -177,7 +175,7 @@ add-shared-script - Add s shared script
|
|
177
175
|
help - Show help
|
178
176
|
|
179
177
|
Predefined scripts:
|
180
|
-
clone - Clone repository
|
178
|
+
clone - Clone repository (Available options: `GIT_DEPTH`)
|
181
179
|
pull - Pull latest source code
|
182
180
|
clean - Clean the service dir
|
183
181
|
poop - Poop
|
data/lib/devkitkat/command.rb
CHANGED
@@ -12,8 +12,8 @@ module Devkitkat
|
|
12
12
|
show_version if script == 'version'
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
16
|
-
options[:
|
15
|
+
def interactive?
|
16
|
+
options[:interactive]
|
17
17
|
end
|
18
18
|
|
19
19
|
def variables
|
@@ -62,20 +62,8 @@ module Devkitkat
|
|
62
62
|
options[:debug] = v
|
63
63
|
end
|
64
64
|
|
65
|
-
opts.on("-
|
66
|
-
options[:
|
67
|
-
end
|
68
|
-
|
69
|
-
opts.on("-r", "--remote REMOTE", "Git remote") do |v|
|
70
|
-
options[:git_remote] = v
|
71
|
-
end
|
72
|
-
|
73
|
-
opts.on("-b", "--branch BRANCH", "Git branch") do |v|
|
74
|
-
options[:git_branch] = v
|
75
|
-
end
|
76
|
-
|
77
|
-
opts.on("-t", "--tty", "TTY mode. In this mode, log won't be emitted.") do |v|
|
78
|
-
options[:tty] = v
|
65
|
+
opts.on("-i", "--interactive", "Interactive mode. STDOUT is streamed in console.") do |v|
|
66
|
+
options[:interactive] = v
|
79
67
|
end
|
80
68
|
|
81
69
|
opts.on("-v", "--version", "Show version") do |v|
|
@@ -95,7 +83,7 @@ module Devkitkat
|
|
95
83
|
opts.separator "help - Show help"
|
96
84
|
opts.separator ""
|
97
85
|
opts.separator "Predefined scripts:"
|
98
|
-
opts.separator "clone - Clone repository"
|
86
|
+
opts.separator "clone - Clone repository (Available options: `GIT_DEPTH`)"
|
99
87
|
opts.separator "pull - Pull latest source code"
|
100
88
|
opts.separator "clean - Clean the service dir"
|
101
89
|
opts.separator "poop - Poop"
|
data/lib/devkitkat/main.rb
CHANGED
@@ -8,10 +8,6 @@ module Devkitkat
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def execute
|
11
|
-
if command.tty? && target_services.count > 1
|
12
|
-
raise ArgumentError, 'TTY mode accepts only one service'
|
13
|
-
end
|
14
|
-
|
15
11
|
results = []
|
16
12
|
|
17
13
|
print_log_paths
|
@@ -39,7 +35,7 @@ module Devkitkat
|
|
39
35
|
end
|
40
36
|
|
41
37
|
def print_log_paths
|
42
|
-
return if command.
|
38
|
+
return if command.interactive?
|
43
39
|
|
44
40
|
log_paths = target_services.map(&:log_path)
|
45
41
|
puts %Q{See the log at \n#{log_paths.join("\n")}}
|
data/lib/devkitkat/service.rb
CHANGED
@@ -139,7 +139,7 @@ set -e
|
|
139
139
|
end
|
140
140
|
|
141
141
|
def setup_logger
|
142
|
-
return if command.
|
142
|
+
return if command.interactive?
|
143
143
|
|
144
144
|
executor.write("exec > #{log_path} 2>&1")
|
145
145
|
end
|
@@ -209,22 +209,21 @@ See the log file: #{log_path}]
|
|
209
209
|
def clone
|
210
210
|
return unless repo_defined?
|
211
211
|
|
212
|
-
|
212
|
+
cmd = <<-EOS
|
213
|
+
if [ -n "$GIT_DEPTH" ]; then
|
214
|
+
git clone #{repo} #{src_dir} --depth $GIT_DEPTH
|
215
|
+
else
|
216
|
+
git clone #{repo} #{src_dir}
|
217
|
+
fi
|
218
|
+
EOS
|
213
219
|
|
214
|
-
|
215
|
-
options << "--depth #{command.options[:git_depth]}"
|
216
|
-
end
|
217
|
-
|
218
|
-
executor.write("git clone #{repo} #{src_dir} #{options.join(' ')}")
|
220
|
+
executor.write(cmd)
|
219
221
|
end
|
220
222
|
|
221
223
|
def pull
|
222
224
|
return unless repo_defined?
|
223
225
|
|
224
|
-
|
225
|
-
branch = command.options[:git_branch] || 'master'
|
226
|
-
|
227
|
-
executor.write("git pull #{remote} #{branch}")
|
226
|
+
executor.write("git pull origin master")
|
228
227
|
end
|
229
228
|
|
230
229
|
def clean
|
data/lib/devkitkat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devkitkat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shinya Maeda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|