##// END OF EJS Templates
feat(dev-env): fast start celery/ssh on dev env, but replace them with code-based instances if they are started
super-admin -
Show More
@@ -1,3196 +1,3196 b''
1 #!/usr/bin/env bash
1 #!/usr/bin/env bash
2 # This script was generated by bashly 1.0.8 (https://bashly.dannyb.co)
2 # This script was generated by bashly 1.0.8 (https://bashly.dannyb.co)
3 # Modifying it manually is not recommended
3 # Modifying it manually is not recommended
4
4
5 # :wrapper.bash3_bouncer
5 # :wrapper.bash3_bouncer
6 if [[ "${BASH_VERSINFO:-0}" -lt 4 ]]; then
6 if [[ "${BASH_VERSINFO:-0}" -lt 4 ]]; then
7 printf "bash version 4 or higher is required\n" >&2
7 printf "bash version 4 or higher is required\n" >&2
8 exit 1
8 exit 1
9 fi
9 fi
10
10
11 # :command.master_script
11 # :command.master_script
12
12
13 # :command.version_command
13 # :command.version_command
14 version_command() {
14 version_command() {
15 echo "$version"
15 echo "$version"
16 }
16 }
17
17
18 # :command.usage
18 # :command.usage
19 dev_tools_usage() {
19 dev_tools_usage() {
20 if [[ -n $long_usage ]]; then
20 if [[ -n $long_usage ]]; then
21 printf "dev-tools - CLI for various dev-tools operation on the stack\n"
21 printf "dev-tools - CLI for various dev-tools operation on the stack\n"
22 echo
22 echo
23
23
24 else
24 else
25 printf "dev-tools - CLI for various dev-tools operation on the stack\n"
25 printf "dev-tools - CLI for various dev-tools operation on the stack\n"
26 echo
26 echo
27
27
28 fi
28 fi
29
29
30 printf "%s\n" "Usage:"
30 printf "%s\n" "Usage:"
31 printf " dev-tools COMMAND\n"
31 printf " dev-tools COMMAND\n"
32 printf " dev-tools [COMMAND] --help | -h\n"
32 printf " dev-tools [COMMAND] --help | -h\n"
33 printf " dev-tools --version | -v\n"
33 printf " dev-tools --version | -v\n"
34 echo
34 echo
35 # :command.usage_commands
35 # :command.usage_commands
36 printf "%s\n" "dev-env Commands:"
36 printf "%s\n" "dev-env Commands:"
37 printf " %s run bash console for vcsserver\n" "vcs "
37 printf " %s run bash console for vcsserver\n" "vcs "
38 printf " %s run bash console for rhodecode-ee\n" "ee "
38 printf " %s run bash console for rhodecode-ee\n" "ee "
39 printf " %s run bash console for rhodecode-ce\n" "ce "
39 printf " %s run bash console for rhodecode-ce\n" "ce "
40 printf " %s run bash console for svn web\n" "svn "
40 printf " %s run bash console for svn web\n" "svn "
41 printf " %s run bash console for rhodecode-celery\n" "celery "
41 printf " %s run bash console for rhodecode-celery\n" "celery "
42 printf " %s run celery instance on top of mounted source code, e.g ./dev-tools celeryd&\n" "celeryd "
42 printf " %s run celery instance on top of mounted source code, e.g ./dev-tools celeryd&\n" "celeryd "
43 printf " %s run bash console for rhodecode-ssh\n" "ssh "
43 printf " %s run bash console for rhodecode-ssh\n" "ssh "
44 printf " %s run sshd instance for rhodecode-ssh\n" "sshd "
44 printf " %s run sshd instance for rhodecode-ssh\n" "sshd "
45 printf " %s run bash console for rhodecode-tools-ce\n" "tools "
45 printf " %s run bash console for rhodecode-tools-ce\n" "tools "
46 printf " %s create dev env required to run vcsserver and rhodecode\n" "dev-env "
46 printf " %s create dev env required to run vcsserver and rhodecode\n" "dev-env "
47 echo
47 echo
48 printf "%s\n" "Cleanup Commands:"
48 printf "%s\n" "Cleanup Commands:"
49 printf " %s clears docker images\n" "prune "
49 printf " %s clears docker images\n" "prune "
50 printf " %s clears docker images and system cache, full cleanup. Be cautious !\n" "prune-all "
50 printf " %s clears docker images and system cache, full cleanup. Be cautious !\n" "prune-all "
51 echo
51 echo
52 printf "%s\n" "CLI generation Commands:"
52 printf "%s\n" "CLI generation Commands:"
53 printf " %s pull latest image of bashly\n" "cli-generate-pull "
53 printf " %s pull latest image of bashly\n" "cli-generate-pull "
54 printf " %s print out help about bashly\n" "cli-generate-help "
54 printf " %s print out help about bashly\n" "cli-generate-help "
55 printf " %s set the version for rcstack\n" "stack-cli-version "
55 printf " %s set the version for rcstack\n" "stack-cli-version "
56 printf " %s run a ./rcstack generation script\n" "cli-generate-rc "
56 printf " %s run a ./rcstack generation script\n" "cli-generate-rc "
57 printf " %s run a ./dev-tools generation script\n" "cli-generate-dev "
57 printf " %s run a ./dev-tools generation script\n" "cli-generate-dev "
58 echo
58 echo
59 printf "%s\n" "Build Commands:"
59 printf "%s\n" "Build Commands:"
60 printf " %s Fetch Artifacts to run installer based build\n" "get-build-artifacts"
60 printf " %s Fetch Artifacts to run installer based build\n" "get-build-artifacts"
61 printf " %s Build RhodeCode image from installer, ./dev-tools get-build-artifacts initially\n" "build-installer "
61 printf " %s Build RhodeCode image from installer, ./dev-tools get-build-artifacts initially\n" "build-installer "
62 printf " %s Fetch RhodeCode sources, store in .source dir to run a source-based builds\n" "get-build-source "
62 printf " %s Fetch RhodeCode sources, store in .source dir to run a source-based builds\n" "get-build-source "
63 printf " %s Build RhodeCode image from source, requires ./dev-tools get-build-source initially\n" "build-source "
63 printf " %s Build RhodeCode image from source, requires ./dev-tools get-build-source initially\n" "build-source "
64 echo
64 echo
65
65
66 # :command.long_usage
66 # :command.long_usage
67 if [[ -n $long_usage ]]; then
67 if [[ -n $long_usage ]]; then
68 printf "%s\n" "Options:"
68 printf "%s\n" "Options:"
69
69
70 # :command.usage_fixed_flags
70 # :command.usage_fixed_flags
71 printf " %s\n" "--help, -h"
71 printf " %s\n" "--help, -h"
72 printf " Show this help\n"
72 printf " Show this help\n"
73 echo
73 echo
74 printf " %s\n" "--version, -v"
74 printf " %s\n" "--version, -v"
75 printf " Show version number\n"
75 printf " Show version number\n"
76 echo
76 echo
77
77
78 # :command.footer
78 # :command.footer
79 printf "RhodeCode Inc 2024\n\n"
79 printf "RhodeCode Inc 2024\n\n"
80 echo
80 echo
81
81
82 fi
82 fi
83 }
83 }
84
84
85 # :command.usage
85 # :command.usage
86 dev_tools_vcs_usage() {
86 dev_tools_vcs_usage() {
87 if [[ -n $long_usage ]]; then
87 if [[ -n $long_usage ]]; then
88 printf "dev-tools vcs - run bash console for vcsserver\n"
88 printf "dev-tools vcs - run bash console for vcsserver\n"
89 echo
89 echo
90
90
91 else
91 else
92 printf "dev-tools vcs - run bash console for vcsserver\n"
92 printf "dev-tools vcs - run bash console for vcsserver\n"
93 echo
93 echo
94
94
95 fi
95 fi
96
96
97 printf "Alias: v\n"
97 printf "Alias: v\n"
98 echo
98 echo
99
99
100 printf "%s\n" "Usage:"
100 printf "%s\n" "Usage:"
101 printf " dev-tools vcs\n"
101 printf " dev-tools vcs\n"
102 printf " dev-tools vcs --help | -h\n"
102 printf " dev-tools vcs --help | -h\n"
103 echo
103 echo
104
104
105 # :command.long_usage
105 # :command.long_usage
106 if [[ -n $long_usage ]]; then
106 if [[ -n $long_usage ]]; then
107 printf "%s\n" "Options:"
107 printf "%s\n" "Options:"
108
108
109 # :command.usage_fixed_flags
109 # :command.usage_fixed_flags
110 printf " %s\n" "--help, -h"
110 printf " %s\n" "--help, -h"
111 printf " Show this help\n"
111 printf " Show this help\n"
112 echo
112 echo
113
113
114 fi
114 fi
115 }
115 }
116
116
117 # :command.usage
117 # :command.usage
118 dev_tools_ee_usage() {
118 dev_tools_ee_usage() {
119 if [[ -n $long_usage ]]; then
119 if [[ -n $long_usage ]]; then
120 printf "dev-tools ee - run bash console for rhodecode-ee\n"
120 printf "dev-tools ee - run bash console for rhodecode-ee\n"
121 echo
121 echo
122
122
123 else
123 else
124 printf "dev-tools ee - run bash console for rhodecode-ee\n"
124 printf "dev-tools ee - run bash console for rhodecode-ee\n"
125 echo
125 echo
126
126
127 fi
127 fi
128
128
129 printf "Alias: e\n"
129 printf "Alias: e\n"
130 echo
130 echo
131
131
132 printf "%s\n" "Usage:"
132 printf "%s\n" "Usage:"
133 printf " dev-tools ee\n"
133 printf " dev-tools ee\n"
134 printf " dev-tools ee --help | -h\n"
134 printf " dev-tools ee --help | -h\n"
135 echo
135 echo
136
136
137 # :command.long_usage
137 # :command.long_usage
138 if [[ -n $long_usage ]]; then
138 if [[ -n $long_usage ]]; then
139 printf "%s\n" "Options:"
139 printf "%s\n" "Options:"
140
140
141 # :command.usage_fixed_flags
141 # :command.usage_fixed_flags
142 printf " %s\n" "--help, -h"
142 printf " %s\n" "--help, -h"
143 printf " Show this help\n"
143 printf " Show this help\n"
144 echo
144 echo
145
145
146 fi
146 fi
147 }
147 }
148
148
149 # :command.usage
149 # :command.usage
150 dev_tools_ce_usage() {
150 dev_tools_ce_usage() {
151 if [[ -n $long_usage ]]; then
151 if [[ -n $long_usage ]]; then
152 printf "dev-tools ce - run bash console for rhodecode-ce\n"
152 printf "dev-tools ce - run bash console for rhodecode-ce\n"
153 echo
153 echo
154
154
155 else
155 else
156 printf "dev-tools ce - run bash console for rhodecode-ce\n"
156 printf "dev-tools ce - run bash console for rhodecode-ce\n"
157 echo
157 echo
158
158
159 fi
159 fi
160
160
161 printf "Alias: c\n"
161 printf "Alias: c\n"
162 echo
162 echo
163
163
164 printf "%s\n" "Usage:"
164 printf "%s\n" "Usage:"
165 printf " dev-tools ce\n"
165 printf " dev-tools ce\n"
166 printf " dev-tools ce --help | -h\n"
166 printf " dev-tools ce --help | -h\n"
167 echo
167 echo
168
168
169 # :command.long_usage
169 # :command.long_usage
170 if [[ -n $long_usage ]]; then
170 if [[ -n $long_usage ]]; then
171 printf "%s\n" "Options:"
171 printf "%s\n" "Options:"
172
172
173 # :command.usage_fixed_flags
173 # :command.usage_fixed_flags
174 printf " %s\n" "--help, -h"
174 printf " %s\n" "--help, -h"
175 printf " Show this help\n"
175 printf " Show this help\n"
176 echo
176 echo
177
177
178 fi
178 fi
179 }
179 }
180
180
181 # :command.usage
181 # :command.usage
182 dev_tools_svn_usage() {
182 dev_tools_svn_usage() {
183 if [[ -n $long_usage ]]; then
183 if [[ -n $long_usage ]]; then
184 printf "dev-tools svn - run bash console for svn web\n"
184 printf "dev-tools svn - run bash console for svn web\n"
185 echo
185 echo
186
186
187 else
187 else
188 printf "dev-tools svn - run bash console for svn web\n"
188 printf "dev-tools svn - run bash console for svn web\n"
189 echo
189 echo
190
190
191 fi
191 fi
192
192
193 printf "Alias: s\n"
193 printf "Alias: s\n"
194 echo
194 echo
195
195
196 printf "%s\n" "Usage:"
196 printf "%s\n" "Usage:"
197 printf " dev-tools svn\n"
197 printf " dev-tools svn\n"
198 printf " dev-tools svn --help | -h\n"
198 printf " dev-tools svn --help | -h\n"
199 echo
199 echo
200
200
201 # :command.long_usage
201 # :command.long_usage
202 if [[ -n $long_usage ]]; then
202 if [[ -n $long_usage ]]; then
203 printf "%s\n" "Options:"
203 printf "%s\n" "Options:"
204
204
205 # :command.usage_fixed_flags
205 # :command.usage_fixed_flags
206 printf " %s\n" "--help, -h"
206 printf " %s\n" "--help, -h"
207 printf " Show this help\n"
207 printf " Show this help\n"
208 echo
208 echo
209
209
210 fi
210 fi
211 }
211 }
212
212
213 # :command.usage
213 # :command.usage
214 dev_tools_celery_usage() {
214 dev_tools_celery_usage() {
215 if [[ -n $long_usage ]]; then
215 if [[ -n $long_usage ]]; then
216 printf "dev-tools celery - run bash console for rhodecode-celery\n"
216 printf "dev-tools celery - run bash console for rhodecode-celery\n"
217 echo
217 echo
218
218
219 else
219 else
220 printf "dev-tools celery - run bash console for rhodecode-celery\n"
220 printf "dev-tools celery - run bash console for rhodecode-celery\n"
221 echo
221 echo
222
222
223 fi
223 fi
224
224
225 printf "%s\n" "Usage:"
225 printf "%s\n" "Usage:"
226 printf " dev-tools celery [OPTIONS]\n"
226 printf " dev-tools celery [OPTIONS]\n"
227 printf " dev-tools celery --help | -h\n"
227 printf " dev-tools celery --help | -h\n"
228 echo
228 echo
229
229
230 # :command.long_usage
230 # :command.long_usage
231 if [[ -n $long_usage ]]; then
231 if [[ -n $long_usage ]]; then
232 printf "%s\n" "Options:"
232 printf "%s\n" "Options:"
233
233
234 # :command.usage_flags
234 # :command.usage_flags
235 # :flag.usage
235 # :flag.usage
236 printf " %s\n" "--workdir WORKDIR"
236 printf " %s\n" "--workdir WORKDIR"
237 printf " workdir to run the pip install -e on top of can be ce or ee only\n"
237 printf " workdir to run the pip install -e on top of can be ce or ee only\n"
238 printf " Default: /home/rhodecode/rhodecode-enterprise-ce\n"
238 printf " Default: /home/rhodecode/rhodecode-enterprise-ce\n"
239 echo
239 echo
240
240
241 # :flag.usage
241 # :flag.usage
242 printf " %s\n" "--cmd CMD"
242 printf " %s\n" "--cmd CMD"
243 printf " cmd script to run, this is on host machine, relative to $WORKSPACE_HOME\n"
243 printf " cmd script to run, this is on host machine, relative to $WORKSPACE_HOME\n"
244 printf " Default: .dev-env/cmd-celery.sh\n"
244 printf " Default: .dev-env/cmd-celery.sh\n"
245 echo
245 echo
246
246
247 # :command.usage_fixed_flags
247 # :command.usage_fixed_flags
248 printf " %s\n" "--help, -h"
248 printf " %s\n" "--help, -h"
249 printf " Show this help\n"
249 printf " Show this help\n"
250 echo
250 echo
251
251
252 fi
252 fi
253 }
253 }
254
254
255 # :command.usage
255 # :command.usage
256 dev_tools_celeryd_usage() {
256 dev_tools_celeryd_usage() {
257 if [[ -n $long_usage ]]; then
257 if [[ -n $long_usage ]]; then
258 printf "dev-tools celeryd - run celery instance on top of mounted source code, e.g ./dev-tools celeryd&\n"
258 printf "dev-tools celeryd - run celery instance on top of mounted source code, e.g ./dev-tools celeryd&\n"
259 echo
259 echo
260
260
261 else
261 else
262 printf "dev-tools celeryd - run celery instance on top of mounted source code, e.g ./dev-tools celeryd&\n"
262 printf "dev-tools celeryd - run celery instance on top of mounted source code, e.g ./dev-tools celeryd&\n"
263 echo
263 echo
264
264
265 fi
265 fi
266
266
267 printf "%s\n" "Usage:"
267 printf "%s\n" "Usage:"
268 printf " dev-tools celeryd [OPTIONS]\n"
268 printf " dev-tools celeryd [OPTIONS]\n"
269 printf " dev-tools celeryd --help | -h\n"
269 printf " dev-tools celeryd --help | -h\n"
270 echo
270 echo
271
271
272 # :command.long_usage
272 # :command.long_usage
273 if [[ -n $long_usage ]]; then
273 if [[ -n $long_usage ]]; then
274 printf "%s\n" "Options:"
274 printf "%s\n" "Options:"
275
275
276 # :command.usage_flags
276 # :command.usage_flags
277 # :flag.usage
277 # :flag.usage
278 printf " %s\n" "--workdir WORKDIR"
278 printf " %s\n" "--workdir WORKDIR"
279 printf " workdir to run the pip install -e on top of can be ce or ee only\n"
279 printf " workdir to run the pip install -e on top of can be ce or ee only\n"
280 printf " Default: /home/rhodecode/rhodecode-enterprise-ce\n"
280 printf " Default: /home/rhodecode/rhodecode-enterprise-ce\n"
281 echo
281 echo
282
282
283 # :flag.usage
283 # :flag.usage
284 printf " %s\n" "--cmd CMD"
284 printf " %s\n" "--cmd CMD"
285 printf " cmd script to run, this is on host machine, relative to $WORKSPACE_HOME\n"
285 printf " cmd script to run, this is on host machine, relative to $WORKSPACE_HOME\n"
286 printf " Default: .dev-env/cmd-celeryd.sh\n"
286 printf " Default: .dev-env/cmd-celeryd.sh\n"
287 echo
287 echo
288
288
289 # :command.usage_fixed_flags
289 # :command.usage_fixed_flags
290 printf " %s\n" "--help, -h"
290 printf " %s\n" "--help, -h"
291 printf " Show this help\n"
291 printf " Show this help\n"
292 echo
292 echo
293
293
294 fi
294 fi
295 }
295 }
296
296
297 # :command.usage
297 # :command.usage
298 dev_tools_ssh_usage() {
298 dev_tools_ssh_usage() {
299 if [[ -n $long_usage ]]; then
299 if [[ -n $long_usage ]]; then
300 printf "dev-tools ssh - run bash console for rhodecode-ssh\n"
300 printf "dev-tools ssh - run bash console for rhodecode-ssh\n"
301 echo
301 echo
302
302
303 else
303 else
304 printf "dev-tools ssh - run bash console for rhodecode-ssh\n"
304 printf "dev-tools ssh - run bash console for rhodecode-ssh\n"
305 echo
305 echo
306
306
307 fi
307 fi
308
308
309 printf "%s\n" "Usage:"
309 printf "%s\n" "Usage:"
310 printf " dev-tools ssh [OPTIONS]\n"
310 printf " dev-tools ssh [OPTIONS]\n"
311 printf " dev-tools ssh --help | -h\n"
311 printf " dev-tools ssh --help | -h\n"
312 echo
312 echo
313
313
314 # :command.long_usage
314 # :command.long_usage
315 if [[ -n $long_usage ]]; then
315 if [[ -n $long_usage ]]; then
316 printf "%s\n" "Options:"
316 printf "%s\n" "Options:"
317
317
318 # :command.usage_flags
318 # :command.usage_flags
319 # :flag.usage
319 # :flag.usage
320 printf " %s\n" "--workdir WORKDIR"
320 printf " %s\n" "--workdir WORKDIR"
321 printf " workdir to run the pip install -e on top of can be ce or ee only\n"
321 printf " workdir to run the pip install -e on top of can be ce or ee only\n"
322 printf " Default: /home/rhodecode/rhodecode-enterprise-ce\n"
322 printf " Default: /home/rhodecode/rhodecode-enterprise-ce\n"
323 echo
323 echo
324
324
325 # :flag.usage
325 # :flag.usage
326 printf " %s\n" "--cmd CMD"
326 printf " %s\n" "--cmd CMD"
327 printf " cmd script to run, this is on host machine, relative to $WORKSPACE_HOME\n"
327 printf " cmd script to run, this is on host machine, relative to $WORKSPACE_HOME\n"
328 printf " Default: .dev-env/cmd-ssh.sh\n"
328 printf " Default: .dev-env/cmd-ssh.sh\n"
329 echo
329 echo
330
330
331 # :command.usage_fixed_flags
331 # :command.usage_fixed_flags
332 printf " %s\n" "--help, -h"
332 printf " %s\n" "--help, -h"
333 printf " Show this help\n"
333 printf " Show this help\n"
334 echo
334 echo
335
335
336 fi
336 fi
337 }
337 }
338
338
339 # :command.usage
339 # :command.usage
340 dev_tools_sshd_usage() {
340 dev_tools_sshd_usage() {
341 if [[ -n $long_usage ]]; then
341 if [[ -n $long_usage ]]; then
342 printf "dev-tools sshd - run sshd instance for rhodecode-ssh\n"
342 printf "dev-tools sshd - run sshd instance for rhodecode-ssh\n"
343 echo
343 echo
344
344
345 else
345 else
346 printf "dev-tools sshd - run sshd instance for rhodecode-ssh\n"
346 printf "dev-tools sshd - run sshd instance for rhodecode-ssh\n"
347 echo
347 echo
348
348
349 fi
349 fi
350
350
351 printf "%s\n" "Usage:"
351 printf "%s\n" "Usage:"
352 printf " dev-tools sshd [OPTIONS]\n"
352 printf " dev-tools sshd [OPTIONS]\n"
353 printf " dev-tools sshd --help | -h\n"
353 printf " dev-tools sshd --help | -h\n"
354 echo
354 echo
355
355
356 # :command.long_usage
356 # :command.long_usage
357 if [[ -n $long_usage ]]; then
357 if [[ -n $long_usage ]]; then
358 printf "%s\n" "Options:"
358 printf "%s\n" "Options:"
359
359
360 # :command.usage_flags
360 # :command.usage_flags
361 # :flag.usage
361 # :flag.usage
362 printf " %s\n" "--workdir WORKDIR"
362 printf " %s\n" "--workdir WORKDIR"
363 printf " workdir to run the pip install -e on top of can be ce or ee only\n"
363 printf " workdir to run the pip install -e on top of can be ce or ee only\n"
364 printf " Default: /home/rhodecode/rhodecode-enterprise-ce\n"
364 printf " Default: /home/rhodecode/rhodecode-enterprise-ce\n"
365 echo
365 echo
366
366
367 # :flag.usage
367 # :flag.usage
368 printf " %s\n" "--cmd CMD"
368 printf " %s\n" "--cmd CMD"
369 printf " cmd script to run, this is on host machine, relative to $WORKSPACE_HOME\n"
369 printf " cmd script to run, this is on host machine, relative to $WORKSPACE_HOME\n"
370 printf " Default: .dev-env/cmd-sshd.sh\n"
370 printf " Default: .dev-env/cmd-sshd.sh\n"
371 echo
371 echo
372
372
373 # :command.usage_fixed_flags
373 # :command.usage_fixed_flags
374 printf " %s\n" "--help, -h"
374 printf " %s\n" "--help, -h"
375 printf " Show this help\n"
375 printf " Show this help\n"
376 echo
376 echo
377
377
378 fi
378 fi
379 }
379 }
380
380
381 # :command.usage
381 # :command.usage
382 dev_tools_tools_usage() {
382 dev_tools_tools_usage() {
383 if [[ -n $long_usage ]]; then
383 if [[ -n $long_usage ]]; then
384 printf "dev-tools tools - run bash console for rhodecode-tools-ce\n"
384 printf "dev-tools tools - run bash console for rhodecode-tools-ce\n"
385 echo
385 echo
386
386
387 else
387 else
388 printf "dev-tools tools - run bash console for rhodecode-tools-ce\n"
388 printf "dev-tools tools - run bash console for rhodecode-tools-ce\n"
389 echo
389 echo
390
390
391 fi
391 fi
392
392
393 printf "Alias: t\n"
393 printf "Alias: t\n"
394 echo
394 echo
395
395
396 printf "%s\n" "Usage:"
396 printf "%s\n" "Usage:"
397 printf " dev-tools tools\n"
397 printf " dev-tools tools\n"
398 printf " dev-tools tools --help | -h\n"
398 printf " dev-tools tools --help | -h\n"
399 echo
399 echo
400
400
401 # :command.long_usage
401 # :command.long_usage
402 if [[ -n $long_usage ]]; then
402 if [[ -n $long_usage ]]; then
403 printf "%s\n" "Options:"
403 printf "%s\n" "Options:"
404
404
405 # :command.usage_fixed_flags
405 # :command.usage_fixed_flags
406 printf " %s\n" "--help, -h"
406 printf " %s\n" "--help, -h"
407 printf " Show this help\n"
407 printf " Show this help\n"
408 echo
408 echo
409
409
410 fi
410 fi
411 }
411 }
412
412
413 # :command.usage
413 # :command.usage
414 dev_tools_dev_env_usage() {
414 dev_tools_dev_env_usage() {
415 if [[ -n $long_usage ]]; then
415 if [[ -n $long_usage ]]; then
416 printf "dev-tools dev-env - create dev env required to run vcsserver and rhodecode\n"
416 printf "dev-tools dev-env - create dev env required to run vcsserver and rhodecode\n"
417 echo
417 echo
418
418
419 else
419 else
420 printf "dev-tools dev-env - create dev env required to run vcsserver and rhodecode\n"
420 printf "dev-tools dev-env - create dev env required to run vcsserver and rhodecode\n"
421 echo
421 echo
422
422
423 fi
423 fi
424
424
425 printf "%s\n" "Usage:"
425 printf "%s\n" "Usage:"
426 printf " dev-tools dev-env\n"
426 printf " dev-tools dev-env\n"
427 printf " dev-tools dev-env --help | -h\n"
427 printf " dev-tools dev-env --help | -h\n"
428 echo
428 echo
429
429
430 # :command.long_usage
430 # :command.long_usage
431 if [[ -n $long_usage ]]; then
431 if [[ -n $long_usage ]]; then
432 printf "%s\n" "Options:"
432 printf "%s\n" "Options:"
433
433
434 # :command.usage_fixed_flags
434 # :command.usage_fixed_flags
435 printf " %s\n" "--help, -h"
435 printf " %s\n" "--help, -h"
436 printf " Show this help\n"
436 printf " Show this help\n"
437 echo
437 echo
438
438
439 fi
439 fi
440 }
440 }
441
441
442 # :command.usage
442 # :command.usage
443 dev_tools_prune_usage() {
443 dev_tools_prune_usage() {
444 if [[ -n $long_usage ]]; then
444 if [[ -n $long_usage ]]; then
445 printf "dev-tools prune - clears docker images\n"
445 printf "dev-tools prune - clears docker images\n"
446 echo
446 echo
447
447
448 else
448 else
449 printf "dev-tools prune - clears docker images\n"
449 printf "dev-tools prune - clears docker images\n"
450 echo
450 echo
451
451
452 fi
452 fi
453
453
454 printf "%s\n" "Usage:"
454 printf "%s\n" "Usage:"
455 printf " dev-tools prune\n"
455 printf " dev-tools prune\n"
456 printf " dev-tools prune --help | -h\n"
456 printf " dev-tools prune --help | -h\n"
457 echo
457 echo
458
458
459 # :command.long_usage
459 # :command.long_usage
460 if [[ -n $long_usage ]]; then
460 if [[ -n $long_usage ]]; then
461 printf "%s\n" "Options:"
461 printf "%s\n" "Options:"
462
462
463 # :command.usage_fixed_flags
463 # :command.usage_fixed_flags
464 printf " %s\n" "--help, -h"
464 printf " %s\n" "--help, -h"
465 printf " Show this help\n"
465 printf " Show this help\n"
466 echo
466 echo
467
467
468 fi
468 fi
469 }
469 }
470
470
471 # :command.usage
471 # :command.usage
472 dev_tools_prune_all_usage() {
472 dev_tools_prune_all_usage() {
473 if [[ -n $long_usage ]]; then
473 if [[ -n $long_usage ]]; then
474 printf "dev-tools prune-all - clears docker images and system cache, full cleanup. Be cautious !\n"
474 printf "dev-tools prune-all - clears docker images and system cache, full cleanup. Be cautious !\n"
475 echo
475 echo
476
476
477 else
477 else
478 printf "dev-tools prune-all - clears docker images and system cache, full cleanup. Be cautious !\n"
478 printf "dev-tools prune-all - clears docker images and system cache, full cleanup. Be cautious !\n"
479 echo
479 echo
480
480
481 fi
481 fi
482
482
483 printf "%s\n" "Usage:"
483 printf "%s\n" "Usage:"
484 printf " dev-tools prune-all\n"
484 printf " dev-tools prune-all\n"
485 printf " dev-tools prune-all --help | -h\n"
485 printf " dev-tools prune-all --help | -h\n"
486 echo
486 echo
487
487
488 # :command.long_usage
488 # :command.long_usage
489 if [[ -n $long_usage ]]; then
489 if [[ -n $long_usage ]]; then
490 printf "%s\n" "Options:"
490 printf "%s\n" "Options:"
491
491
492 # :command.usage_fixed_flags
492 # :command.usage_fixed_flags
493 printf " %s\n" "--help, -h"
493 printf " %s\n" "--help, -h"
494 printf " Show this help\n"
494 printf " Show this help\n"
495 echo
495 echo
496
496
497 fi
497 fi
498 }
498 }
499
499
500 # :command.usage
500 # :command.usage
501 dev_tools_cli_generate_pull_usage() {
501 dev_tools_cli_generate_pull_usage() {
502 if [[ -n $long_usage ]]; then
502 if [[ -n $long_usage ]]; then
503 printf "dev-tools cli-generate-pull - pull latest image of bashly\n"
503 printf "dev-tools cli-generate-pull - pull latest image of bashly\n"
504 echo
504 echo
505
505
506 else
506 else
507 printf "dev-tools cli-generate-pull - pull latest image of bashly\n"
507 printf "dev-tools cli-generate-pull - pull latest image of bashly\n"
508 echo
508 echo
509
509
510 fi
510 fi
511
511
512 printf "%s\n" "Usage:"
512 printf "%s\n" "Usage:"
513 printf " dev-tools cli-generate-pull\n"
513 printf " dev-tools cli-generate-pull\n"
514 printf " dev-tools cli-generate-pull --help | -h\n"
514 printf " dev-tools cli-generate-pull --help | -h\n"
515 echo
515 echo
516
516
517 # :command.long_usage
517 # :command.long_usage
518 if [[ -n $long_usage ]]; then
518 if [[ -n $long_usage ]]; then
519 printf "%s\n" "Options:"
519 printf "%s\n" "Options:"
520
520
521 # :command.usage_fixed_flags
521 # :command.usage_fixed_flags
522 printf " %s\n" "--help, -h"
522 printf " %s\n" "--help, -h"
523 printf " Show this help\n"
523 printf " Show this help\n"
524 echo
524 echo
525
525
526 fi
526 fi
527 }
527 }
528
528
529 # :command.usage
529 # :command.usage
530 dev_tools_cli_generate_help_usage() {
530 dev_tools_cli_generate_help_usage() {
531 if [[ -n $long_usage ]]; then
531 if [[ -n $long_usage ]]; then
532 printf "dev-tools cli-generate-help - print out help about bashly\n"
532 printf "dev-tools cli-generate-help - print out help about bashly\n"
533 echo
533 echo
534
534
535 else
535 else
536 printf "dev-tools cli-generate-help - print out help about bashly\n"
536 printf "dev-tools cli-generate-help - print out help about bashly\n"
537 echo
537 echo
538
538
539 fi
539 fi
540
540
541 printf "%s\n" "Usage:"
541 printf "%s\n" "Usage:"
542 printf " dev-tools cli-generate-help\n"
542 printf " dev-tools cli-generate-help\n"
543 printf " dev-tools cli-generate-help --help | -h\n"
543 printf " dev-tools cli-generate-help --help | -h\n"
544 echo
544 echo
545
545
546 # :command.long_usage
546 # :command.long_usage
547 if [[ -n $long_usage ]]; then
547 if [[ -n $long_usage ]]; then
548 printf "%s\n" "Options:"
548 printf "%s\n" "Options:"
549
549
550 # :command.usage_fixed_flags
550 # :command.usage_fixed_flags
551 printf " %s\n" "--help, -h"
551 printf " %s\n" "--help, -h"
552 printf " Show this help\n"
552 printf " Show this help\n"
553 echo
553 echo
554
554
555 fi
555 fi
556 }
556 }
557
557
558 # :command.usage
558 # :command.usage
559 dev_tools_stack_cli_version_usage() {
559 dev_tools_stack_cli_version_usage() {
560 if [[ -n $long_usage ]]; then
560 if [[ -n $long_usage ]]; then
561 printf "dev-tools stack-cli-version - set the version for rcstack\n"
561 printf "dev-tools stack-cli-version - set the version for rcstack\n"
562 echo
562 echo
563
563
564 else
564 else
565 printf "dev-tools stack-cli-version - set the version for rcstack\n"
565 printf "dev-tools stack-cli-version - set the version for rcstack\n"
566 echo
566 echo
567
567
568 fi
568 fi
569
569
570 printf "%s\n" "Usage:"
570 printf "%s\n" "Usage:"
571 printf " dev-tools stack-cli-version VERSION\n"
571 printf " dev-tools stack-cli-version VERSION\n"
572 printf " dev-tools stack-cli-version --help | -h\n"
572 printf " dev-tools stack-cli-version --help | -h\n"
573 echo
573 echo
574
574
575 # :command.long_usage
575 # :command.long_usage
576 if [[ -n $long_usage ]]; then
576 if [[ -n $long_usage ]]; then
577 printf "%s\n" "Options:"
577 printf "%s\n" "Options:"
578
578
579 # :command.usage_fixed_flags
579 # :command.usage_fixed_flags
580 printf " %s\n" "--help, -h"
580 printf " %s\n" "--help, -h"
581 printf " Show this help\n"
581 printf " Show this help\n"
582 echo
582 echo
583
583
584 # :command.usage_args
584 # :command.usage_args
585 printf "%s\n" "Arguments:"
585 printf "%s\n" "Arguments:"
586
586
587 # :argument.usage
587 # :argument.usage
588 printf " %s\n" "VERSION"
588 printf " %s\n" "VERSION"
589 printf " Version to set e.g '5.0.0'\n"
589 printf " Version to set e.g '5.0.0'\n"
590 echo
590 echo
591
591
592 fi
592 fi
593 }
593 }
594
594
595 # :command.usage
595 # :command.usage
596 dev_tools_cli_generate_rc_usage() {
596 dev_tools_cli_generate_rc_usage() {
597 if [[ -n $long_usage ]]; then
597 if [[ -n $long_usage ]]; then
598 printf "dev-tools cli-generate-rc - run a ./rcstack generation script\n"
598 printf "dev-tools cli-generate-rc - run a ./rcstack generation script\n"
599 echo
599 echo
600
600
601 else
601 else
602 printf "dev-tools cli-generate-rc - run a ./rcstack generation script\n"
602 printf "dev-tools cli-generate-rc - run a ./rcstack generation script\n"
603 echo
603 echo
604
604
605 fi
605 fi
606
606
607 printf "%s\n" "Usage:"
607 printf "%s\n" "Usage:"
608 printf " dev-tools cli-generate-rc [OPTIONS]\n"
608 printf " dev-tools cli-generate-rc [OPTIONS]\n"
609 printf " dev-tools cli-generate-rc --help | -h\n"
609 printf " dev-tools cli-generate-rc --help | -h\n"
610 echo
610 echo
611
611
612 # :command.long_usage
612 # :command.long_usage
613 if [[ -n $long_usage ]]; then
613 if [[ -n $long_usage ]]; then
614 printf "%s\n" "Options:"
614 printf "%s\n" "Options:"
615
615
616 # :command.usage_flags
616 # :command.usage_flags
617 # :flag.usage
617 # :flag.usage
618 printf " %s\n" "--one-time, -o"
618 printf " %s\n" "--one-time, -o"
619 printf " run the command a single time without watch\n"
619 printf " run the command a single time without watch\n"
620 echo
620 echo
621
621
622 # :command.usage_fixed_flags
622 # :command.usage_fixed_flags
623 printf " %s\n" "--help, -h"
623 printf " %s\n" "--help, -h"
624 printf " Show this help\n"
624 printf " Show this help\n"
625 echo
625 echo
626
626
627 fi
627 fi
628 }
628 }
629
629
630 # :command.usage
630 # :command.usage
631 dev_tools_cli_generate_dev_usage() {
631 dev_tools_cli_generate_dev_usage() {
632 if [[ -n $long_usage ]]; then
632 if [[ -n $long_usage ]]; then
633 printf "dev-tools cli-generate-dev - run a ./dev-tools generation script\n"
633 printf "dev-tools cli-generate-dev - run a ./dev-tools generation script\n"
634 echo
634 echo
635
635
636 else
636 else
637 printf "dev-tools cli-generate-dev - run a ./dev-tools generation script\n"
637 printf "dev-tools cli-generate-dev - run a ./dev-tools generation script\n"
638 echo
638 echo
639
639
640 fi
640 fi
641
641
642 printf "%s\n" "Usage:"
642 printf "%s\n" "Usage:"
643 printf " dev-tools cli-generate-dev [OPTIONS]\n"
643 printf " dev-tools cli-generate-dev [OPTIONS]\n"
644 printf " dev-tools cli-generate-dev --help | -h\n"
644 printf " dev-tools cli-generate-dev --help | -h\n"
645 echo
645 echo
646
646
647 # :command.long_usage
647 # :command.long_usage
648 if [[ -n $long_usage ]]; then
648 if [[ -n $long_usage ]]; then
649 printf "%s\n" "Options:"
649 printf "%s\n" "Options:"
650
650
651 # :command.usage_flags
651 # :command.usage_flags
652 # :flag.usage
652 # :flag.usage
653 printf " %s\n" "--one-time, -o"
653 printf " %s\n" "--one-time, -o"
654 printf " run the command a single time without watch\n"
654 printf " run the command a single time without watch\n"
655 echo
655 echo
656
656
657 # :command.usage_fixed_flags
657 # :command.usage_fixed_flags
658 printf " %s\n" "--help, -h"
658 printf " %s\n" "--help, -h"
659 printf " Show this help\n"
659 printf " Show this help\n"
660 echo
660 echo
661
661
662 fi
662 fi
663 }
663 }
664
664
665 # :command.usage
665 # :command.usage
666 dev_tools_get_build_artifacts_usage() {
666 dev_tools_get_build_artifacts_usage() {
667 if [[ -n $long_usage ]]; then
667 if [[ -n $long_usage ]]; then
668 printf "dev-tools get-build-artifacts - Fetch Artifacts to run installer based build\n"
668 printf "dev-tools get-build-artifacts - Fetch Artifacts to run installer based build\n"
669 echo
669 echo
670
670
671 else
671 else
672 printf "dev-tools get-build-artifacts - Fetch Artifacts to run installer based build\n"
672 printf "dev-tools get-build-artifacts - Fetch Artifacts to run installer based build\n"
673 echo
673 echo
674
674
675 fi
675 fi
676
676
677 printf "%s\n" "Usage:"
677 printf "%s\n" "Usage:"
678 printf " dev-tools get-build-artifacts [OPTIONS]\n"
678 printf " dev-tools get-build-artifacts [OPTIONS]\n"
679 printf " dev-tools get-build-artifacts --help | -h\n"
679 printf " dev-tools get-build-artifacts --help | -h\n"
680 echo
680 echo
681
681
682 # :command.long_usage
682 # :command.long_usage
683 if [[ -n $long_usage ]]; then
683 if [[ -n $long_usage ]]; then
684 printf "%s\n" "Options:"
684 printf "%s\n" "Options:"
685
685
686 # :command.usage_flags
686 # :command.usage_flags
687 # :flag.usage
687 # :flag.usage
688 printf " %s\n" "--auth AUTH"
688 printf " %s\n" "--auth AUTH"
689 printf " Specify custom auth for curl e.g -u admin:secret\n"
689 printf " Specify custom auth for curl e.g -u admin:secret\n"
690 printf " Default: \n"
690 printf " Default: \n"
691 echo
691 echo
692
692
693 # :flag.usage
693 # :flag.usage
694 printf " %s\n" "--installer-url INSTALLER_URL"
694 printf " %s\n" "--installer-url INSTALLER_URL"
695 printf " Installer Download URL\n"
695 printf " Installer Download URL\n"
696 printf " Default: https://dls.rhodecode.com/dls/N2E2ZTY1NzA3NjYxNDA2NTc1NjI3MTcyNzA2MjcxNzIyZTcwNjI3YQ==/rhodecode-control/latest-linux-ee\n"
696 printf " Default: https://dls.rhodecode.com/dls/N2E2ZTY1NzA3NjYxNDA2NTc1NjI3MTcyNzA2MjcxNzIyZTcwNjI3YQ==/rhodecode-control/latest-linux-ee\n"
697 echo
697 echo
698
698
699 # :flag.usage
699 # :flag.usage
700 printf " %s\n" "--manifest-url MANIFEST_URL"
700 printf " %s\n" "--manifest-url MANIFEST_URL"
701 printf " Manifest file url\n"
701 printf " Manifest file url\n"
702 printf " Default: https://dls.rhodecode.com/linux/MANIFEST\n"
702 printf " Default: https://dls.rhodecode.com/linux/MANIFEST\n"
703 echo
703 echo
704
704
705 # :flag.usage
705 # :flag.usage
706 printf " %s\n" "--version-name VERSION_NAME"
706 printf " %s\n" "--version-name VERSION_NAME"
707 printf " Specify custom build ver e.g 4.27.0\n"
707 printf " Specify custom build ver e.g 4.27.0\n"
708 printf " Default: $RC_CLI_VERSION_NAME\n"
708 printf " Default: $RC_CLI_VERSION_NAME\n"
709 echo
709 echo
710
710
711 # :command.usage_fixed_flags
711 # :command.usage_fixed_flags
712 printf " %s\n" "--help, -h"
712 printf " %s\n" "--help, -h"
713 printf " Show this help\n"
713 printf " Show this help\n"
714 echo
714 echo
715
715
716 fi
716 fi
717 }
717 }
718
718
719 # :command.usage
719 # :command.usage
720 dev_tools_build_installer_usage() {
720 dev_tools_build_installer_usage() {
721 if [[ -n $long_usage ]]; then
721 if [[ -n $long_usage ]]; then
722 printf "dev-tools build-installer - Build RhodeCode image from installer, ./dev-tools get-build-artifacts initially\n"
722 printf "dev-tools build-installer - Build RhodeCode image from installer, ./dev-tools get-build-artifacts initially\n"
723 echo
723 echo
724
724
725 else
725 else
726 printf "dev-tools build-installer - Build RhodeCode image from installer, ./dev-tools get-build-artifacts initially\n"
726 printf "dev-tools build-installer - Build RhodeCode image from installer, ./dev-tools get-build-artifacts initially\n"
727 echo
727 echo
728
728
729 fi
729 fi
730
730
731 printf "%s\n" "Usage:"
731 printf "%s\n" "Usage:"
732 printf " dev-tools build-installer [OPTIONS]\n"
732 printf " dev-tools build-installer [OPTIONS]\n"
733 printf " dev-tools build-installer --help | -h\n"
733 printf " dev-tools build-installer --help | -h\n"
734 echo
734 echo
735
735
736 # :command.long_usage
736 # :command.long_usage
737 if [[ -n $long_usage ]]; then
737 if [[ -n $long_usage ]]; then
738 printf "%s\n" "Options:"
738 printf "%s\n" "Options:"
739
739
740 # :command.usage_flags
740 # :command.usage_flags
741 # :flag.usage
741 # :flag.usage
742 printf " %s\n" "--version-name VERSION_NAME"
742 printf " %s\n" "--version-name VERSION_NAME"
743 printf " Specify custom build ver e.g 4.27.0\n"
743 printf " Specify custom build ver e.g 4.27.0\n"
744 printf " Default: $RC_CLI_VERSION_NAME\n"
744 printf " Default: $RC_CLI_VERSION_NAME\n"
745 echo
745 echo
746
746
747 # :command.usage_fixed_flags
747 # :command.usage_fixed_flags
748 printf " %s\n" "--help, -h"
748 printf " %s\n" "--help, -h"
749 printf " Show this help\n"
749 printf " Show this help\n"
750 echo
750 echo
751
751
752 fi
752 fi
753 }
753 }
754
754
755 # :command.usage
755 # :command.usage
756 dev_tools_get_build_source_usage() {
756 dev_tools_get_build_source_usage() {
757 if [[ -n $long_usage ]]; then
757 if [[ -n $long_usage ]]; then
758 printf "dev-tools get-build-source - Fetch RhodeCode sources, store in .source dir to run a source-based builds\n"
758 printf "dev-tools get-build-source - Fetch RhodeCode sources, store in .source dir to run a source-based builds\n"
759 echo
759 echo
760
760
761 else
761 else
762 printf "dev-tools get-build-source - Fetch RhodeCode sources, store in .source dir to run a source-based builds\n"
762 printf "dev-tools get-build-source - Fetch RhodeCode sources, store in .source dir to run a source-based builds\n"
763 echo
763 echo
764
764
765 fi
765 fi
766
766
767 printf "%s\n" "Usage:"
767 printf "%s\n" "Usage:"
768 printf " dev-tools get-build-source [OPTIONS]\n"
768 printf " dev-tools get-build-source [OPTIONS]\n"
769 printf " dev-tools get-build-source --help | -h\n"
769 printf " dev-tools get-build-source --help | -h\n"
770 echo
770 echo
771
771
772 # :command.long_usage
772 # :command.long_usage
773 if [[ -n $long_usage ]]; then
773 if [[ -n $long_usage ]]; then
774 printf "%s\n" "Options:"
774 printf "%s\n" "Options:"
775
775
776 # :command.usage_flags
776 # :command.usage_flags
777 # :flag.usage
777 # :flag.usage
778 printf " %s\n" "--revision REVISION"
778 printf " %s\n" "--revision REVISION"
779 printf " revision to download\n"
779 printf " revision to download\n"
780 printf " Default: default\n"
780 printf " Default: default\n"
781 echo
781 echo
782
782
783 # :flag.usage
783 # :flag.usage
784 printf " %s\n" "--auth-token AUTH_TOKEN"
784 printf " %s\n" "--auth-token AUTH_TOKEN"
785 printf " Specify AUTH TOKEN to obtain sources\n"
785 printf " Specify AUTH TOKEN to obtain sources\n"
786 echo
786 echo
787
787
788 # :flag.usage
788 # :flag.usage
789 printf " %s\n" "--server-url SERVER_URL"
789 printf " %s\n" "--server-url SERVER_URL"
790 printf " Specify RhodeCode server location where projects should be downloaded\n"
790 printf " Specify RhodeCode server location where projects should be downloaded\n"
791 printf " Default: https://code.rhodecode.com\n"
791 printf " Default: https://code.rhodecode.com\n"
792 echo
792 echo
793
793
794 # :command.usage_fixed_flags
794 # :command.usage_fixed_flags
795 printf " %s\n" "--help, -h"
795 printf " %s\n" "--help, -h"
796 printf " Show this help\n"
796 printf " Show this help\n"
797 echo
797 echo
798
798
799 # :command.usage_examples
799 # :command.usage_examples
800 printf "%s\n" "Examples:"
800 printf "%s\n" "Examples:"
801 printf " ./dev-tools get-sources $RC_CLI_VERSION_NAME\n"
801 printf " ./dev-tools get-sources $RC_CLI_VERSION_NAME\n"
802 printf " ./dev-tools get-sources default --auth-token xyxyxyx --server-url\n https://secret.repo/\n"
802 printf " ./dev-tools get-sources default --auth-token xyxyxyx --server-url\n https://secret.repo/\n"
803 echo
803 echo
804
804
805 fi
805 fi
806 }
806 }
807
807
808 # :command.usage
808 # :command.usage
809 dev_tools_build_source_usage() {
809 dev_tools_build_source_usage() {
810 if [[ -n $long_usage ]]; then
810 if [[ -n $long_usage ]]; then
811 printf "dev-tools build-source - Build RhodeCode image from source, requires ./dev-tools get-build-source initially\n"
811 printf "dev-tools build-source - Build RhodeCode image from source, requires ./dev-tools get-build-source initially\n"
812 echo
812 echo
813
813
814 else
814 else
815 printf "dev-tools build-source - Build RhodeCode image from source, requires ./dev-tools get-build-source initially\n"
815 printf "dev-tools build-source - Build RhodeCode image from source, requires ./dev-tools get-build-source initially\n"
816 echo
816 echo
817
817
818 fi
818 fi
819
819
820 printf "%s\n" "Usage:"
820 printf "%s\n" "Usage:"
821 printf " dev-tools build-source [OPTIONS]\n"
821 printf " dev-tools build-source [OPTIONS]\n"
822 printf " dev-tools build-source --help | -h\n"
822 printf " dev-tools build-source --help | -h\n"
823 echo
823 echo
824
824
825 # :command.long_usage
825 # :command.long_usage
826 if [[ -n $long_usage ]]; then
826 if [[ -n $long_usage ]]; then
827 printf "%s\n" "Options:"
827 printf "%s\n" "Options:"
828
828
829 # :command.usage_flags
829 # :command.usage_flags
830 # :flag.usage
830 # :flag.usage
831 printf " %s\n" "--version-name VERSION_NAME"
831 printf " %s\n" "--version-name VERSION_NAME"
832 printf " Specify custom build ver e.g 4.27.0\n"
832 printf " Specify custom build ver e.g 4.27.0\n"
833 printf " Default: $RC_CLI_VERSION_NAME\n"
833 printf " Default: $RC_CLI_VERSION_NAME\n"
834 echo
834 echo
835
835
836 # :flag.usage
836 # :flag.usage
837 printf " %s\n" "--source-build-yaml BUILD_SOURCE_YAML"
837 printf " %s\n" "--source-build-yaml BUILD_SOURCE_YAML"
838 printf " yaml file to build source against\n"
838 printf " yaml file to build source against\n"
839 printf " Default: build_yaml/docker-compose-apps.5.yaml\n"
839 printf " Default: build_yaml/docker-compose-apps.5.yaml\n"
840 echo
840 echo
841
841
842 # :flag.usage
842 # :flag.usage
843 printf " %s\n" "--tag TAG (repeatable)"
843 printf " %s\n" "--tag TAG (repeatable)"
844 printf " tag build image\n"
844 printf " tag build image\n"
845 echo
845 echo
846
846
847 # :command.usage_fixed_flags
847 # :command.usage_fixed_flags
848 printf " %s\n" "--help, -h"
848 printf " %s\n" "--help, -h"
849 printf " Show this help\n"
849 printf " Show this help\n"
850 echo
850 echo
851
851
852 # :command.usage_examples
852 # :command.usage_examples
853 printf "%s\n" "Examples:"
853 printf "%s\n" "Examples:"
854 printf " ./dev-tools build-source --source-build-yaml\n build_yaml/docker-compose-apps.5.yaml --version-name 5.0.0.beta1 --tag beta\n"
854 printf " ./dev-tools build-source --source-build-yaml\n build_yaml/docker-compose-apps.5.yaml --version-name 5.0.0.beta1 --tag beta\n"
855 printf " ./dev-tools build-source --source-build-yaml\n build_yaml/docker-compose-apps.4.yaml --version-name 4.28.0 --tag stable\n"
855 printf " ./dev-tools build-source --source-build-yaml\n build_yaml/docker-compose-apps.4.yaml --version-name 4.28.0 --tag stable\n"
856 echo
856 echo
857
857
858 fi
858 fi
859 }
859 }
860
860
861 # :command.normalize_input
861 # :command.normalize_input
862 normalize_input() {
862 normalize_input() {
863 local arg flags
863 local arg flags
864
864
865 while [[ $# -gt 0 ]]; do
865 while [[ $# -gt 0 ]]; do
866 arg="$1"
866 arg="$1"
867 if [[ $arg =~ ^(--[a-zA-Z0-9_\-]+)=(.+)$ ]]; then
867 if [[ $arg =~ ^(--[a-zA-Z0-9_\-]+)=(.+)$ ]]; then
868 input+=("${BASH_REMATCH[1]}")
868 input+=("${BASH_REMATCH[1]}")
869 input+=("${BASH_REMATCH[2]}")
869 input+=("${BASH_REMATCH[2]}")
870 elif [[ $arg =~ ^(-[a-zA-Z0-9])=(.+)$ ]]; then
870 elif [[ $arg =~ ^(-[a-zA-Z0-9])=(.+)$ ]]; then
871 input+=("${BASH_REMATCH[1]}")
871 input+=("${BASH_REMATCH[1]}")
872 input+=("${BASH_REMATCH[2]}")
872 input+=("${BASH_REMATCH[2]}")
873 elif [[ $arg =~ ^-([a-zA-Z0-9][a-zA-Z0-9]+)$ ]]; then
873 elif [[ $arg =~ ^-([a-zA-Z0-9][a-zA-Z0-9]+)$ ]]; then
874 flags="${BASH_REMATCH[1]}"
874 flags="${BASH_REMATCH[1]}"
875 for ((i = 0; i < ${#flags}; i++)); do
875 for ((i = 0; i < ${#flags}; i++)); do
876 input+=("-${flags:i:1}")
876 input+=("-${flags:i:1}")
877 done
877 done
878 else
878 else
879 input+=("$arg")
879 input+=("$arg")
880 fi
880 fi
881
881
882 shift
882 shift
883 done
883 done
884 }
884 }
885 # :command.inspect_args
885 # :command.inspect_args
886 inspect_args() {
886 inspect_args() {
887 if ((${#args[@]})); then
887 if ((${#args[@]})); then
888 readarray -t sorted_keys < <(printf '%s\n' "${!args[@]}" | sort)
888 readarray -t sorted_keys < <(printf '%s\n' "${!args[@]}" | sort)
889 echo args:
889 echo args:
890 for k in "${sorted_keys[@]}"; do echo "- \${args[$k]} = ${args[$k]}"; done
890 for k in "${sorted_keys[@]}"; do echo "- \${args[$k]} = ${args[$k]}"; done
891 else
891 else
892 echo args: none
892 echo args: none
893 fi
893 fi
894
894
895 if ((${#other_args[@]})); then
895 if ((${#other_args[@]})); then
896 echo
896 echo
897 echo other_args:
897 echo other_args:
898 echo "- \${other_args[*]} = ${other_args[*]}"
898 echo "- \${other_args[*]} = ${other_args[*]}"
899 for i in "${!other_args[@]}"; do
899 for i in "${!other_args[@]}"; do
900 echo "- \${other_args[$i]} = ${other_args[$i]}"
900 echo "- \${other_args[$i]} = ${other_args[$i]}"
901 done
901 done
902 fi
902 fi
903
903
904 if ((${#deps[@]})); then
904 if ((${#deps[@]})); then
905 readarray -t sorted_keys < <(printf '%s\n' "${!deps[@]}" | sort)
905 readarray -t sorted_keys < <(printf '%s\n' "${!deps[@]}" | sort)
906 echo
906 echo
907 echo deps:
907 echo deps:
908 for k in "${sorted_keys[@]}"; do echo "- \${deps[$k]} = ${deps[$k]}"; done
908 for k in "${sorted_keys[@]}"; do echo "- \${deps[$k]} = ${deps[$k]}"; done
909 fi
909 fi
910
910
911 }
911 }
912
912
913 # :command.command_functions
913 # :command.command_functions
914 # :command.function
914 # :command.function
915 dev_tools_vcs_command() {
915 dev_tools_vcs_command() {
916 # src/vcs_command.sh
916 # src/vcs_command.sh
917 container_name=dev-vcsserver
917 container_name=dev-vcsserver
918 dev_env_file="/home/rhodecode/rhodecode-vcsserver/.dev/dev-env.sh"
918 dev_env_file="/home/rhodecode/rhodecode-vcsserver/.dev/dev-env.sh"
919 env_file=".custom/.dev.env"
919 env_file=".custom/.dev.env"
920
920
921 docker_id=$(docker ps -q --filter "name=$container_name")
921 docker_id=$(docker ps -q --filter "name=$container_name")
922
922
923 if [[ $docker_id ]]; then
923 if [[ $docker_id ]]; then
924 echo $container_name FOUND, Killing old one !
924 echo $container_name FOUND, Killing old one !
925 docker kill -s 9 $docker_id
925 docker kill -s 9 $docker_id
926 sleep 5
926 sleep 5
927 docker rm -fv $container_name
927 docker rm -fv $container_name
928 echo "done..."
928 echo "done..."
929 else
929 else
930 echo $container_name not found
930 echo $container_name not found
931 # # bootstrap dev-env.sh
931 # # bootstrap dev-env.sh
932 # if [[ ! -f $dev_env_file ]]; then
932 # if [[ ! -f $dev_env_file ]]; then
933 # echo "bootstrap of new dev-env file under $dev_env_file"
933 # echo "bootstrap of new dev-env file under $dev_env_file"
934 # fi
934 # fi
935 fi
935 fi
936
936
937 if [[ -v WORKSPACE_HOME ]];
937 if [[ -v WORKSPACE_HOME ]];
938 then
938 then
939 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
939 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
940 else
940 else
941 echo "WORKSPACE_HOME env var is not set"
941 echo "WORKSPACE_HOME env var is not set"
942 exit 1
942 exit 1
943 fi
943 fi
944
944
945 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
945 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
946
946
947 eval "
947 eval "
948 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME \
948 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME \
949 ./rcstack stack --env-file-path $env_file rhodecode -f docker-compose-apps.dev.yaml \
949 ./rcstack stack --env-file-path $env_file rhodecode -f docker-compose-apps.dev.yaml \
950 run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_sh \
950 run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_sh \
951 --publish 10010:10010 --rm --use-aliases \
951 --publish 10010:10010 --rm --use-aliases \
952 --workdir=\"/home/rhodecode/rhodecode-vcsserver\" \
952 --workdir=\"/home/rhodecode/rhodecode-vcsserver\" \
953 --interactive --tty \
953 --interactive --tty \
954 --name=\"$container_name\" vcsserver bash $dev_env_file"
954 --name=\"$container_name\" vcsserver bash $dev_env_file"
955
955
956 }
956 }
957
957
958 # :command.function
958 # :command.function
959 dev_tools_ee_command() {
959 dev_tools_ee_command() {
960 # src/ee_command.sh
960 # src/ee_command.sh
961 container_name=dev-enterprise-ee
961 container_name=dev-enterprise-ee
962 dev_env_file="/home/rhodecode/rhodecode-enterprise-ee/.dev/dev-env.sh"
962 dev_env_file="/home/rhodecode/rhodecode-enterprise-ee/.dev/dev-env.sh"
963 env_file=".custom/.dev.env"
963 env_file=".custom/.dev.env"
964
964
965 docker_id=$(docker ps -q --filter "name=$container_name")
965 docker_id=$(docker ps -q --filter "name=$container_name")
966
966
967 if [[ $docker_id ]]; then
967 if [[ $docker_id ]]; then
968 echo $container_name FOUND, Killing old one !
968 echo $container_name FOUND, Killing old one !
969 docker kill -s 9 $docker_id
969 docker kill -s 9 $docker_id
970 sleep 5
970 sleep 5
971 docker rm -fv $container_name
971 docker rm -fv $container_name
972 echo "done..."
972 echo "done..."
973 else
973 else
974 echo $container_name not found
974 echo $container_name not found
975 # # bootstrap dev-env.sh
975 # # bootstrap dev-env.sh
976 # if [[ ! -f $dev_env_file ]]; then
976 # if [[ ! -f $dev_env_file ]]; then
977 # echo "bootstrap of new dev-env file under $dev_env_file"
977 # echo "bootstrap of new dev-env file under $dev_env_file"
978 # fi
978 # fi
979 fi
979 fi
980
980
981 if [[ -v WORKSPACE_HOME ]];
981 if [[ -v WORKSPACE_HOME ]];
982 then
982 then
983 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
983 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
984 else
984 else
985 echo "WORKSPACE_HOME env var is not set"
985 echo "WORKSPACE_HOME env var is not set"
986 exit 1
986 exit 1
987 fi
987 fi
988
988
989 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
989 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
990
990
991 eval "
991 eval "
992 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME \
992 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME \
993 ./rcstack stack --env-file-path $env_file rhodecode -f docker-compose-apps.dev.yaml \
993 ./rcstack stack --env-file-path $env_file rhodecode -f docker-compose-apps.dev.yaml \
994 run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_sh --rm --use-aliases \
994 run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_sh --rm --use-aliases \
995 --publish 10020:10020 --rm --use-aliases \
995 --publish 10020:10020 --rm --use-aliases \
996 --workdir=\"/home/rhodecode/rhodecode-enterprise-ee\" \
996 --workdir=\"/home/rhodecode/rhodecode-enterprise-ee\" \
997 --interactive --tty \
997 --interactive --tty \
998 --name=\"$container_name\" rhodecode bash $dev_env_file"
998 --name=\"$container_name\" rhodecode bash $dev_env_file"
999 }
999 }
1000
1000
1001 # :command.function
1001 # :command.function
1002 dev_tools_ce_command() {
1002 dev_tools_ce_command() {
1003 # src/ce_command.sh
1003 # src/ce_command.sh
1004 container_name=dev-enterprise-ce
1004 container_name=dev-enterprise-ce
1005 dev_env_file="/home/rhodecode/rhodecode-enterprise-ce/.dev/dev-env.sh"
1005 dev_env_file="/home/rhodecode/rhodecode-enterprise-ce/.dev/dev-env.sh"
1006 env_file=".custom/.dev.env"
1006 env_file=".custom/.dev.env"
1007
1007
1008 docker_id=$(docker ps -q --filter "name=$container_name")
1008 docker_id=$(docker ps -q --filter "name=$container_name")
1009
1009
1010 if [[ $docker_id ]]; then
1010 if [[ $docker_id ]]; then
1011 echo $container_name FOUND, Killing old one !
1011 echo $container_name FOUND, Killing old one !
1012 docker kill -s 9 $docker_id
1012 docker kill -s 9 $docker_id
1013 sleep 5
1013 sleep 5
1014 docker rm -fv $container_name
1014 docker rm -fv $container_name
1015 echo "done..."
1015 echo "done..."
1016 else
1016 else
1017 echo $container_name not found
1017 echo $container_name not found
1018 # # bootstrap dev-env.sh
1018 # # bootstrap dev-env.sh
1019 # if [[ ! -f $dev_env_file ]]; then
1019 # if [[ ! -f $dev_env_file ]]; then
1020 # echo "bootstrap of new dev-env file under $dev_env_file"
1020 # echo "bootstrap of new dev-env file under $dev_env_file"
1021 # fi
1021 # fi
1022 fi
1022 fi
1023
1023
1024 if [[ -v WORKSPACE_HOME ]];
1024 if [[ -v WORKSPACE_HOME ]];
1025 then
1025 then
1026 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
1026 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
1027 else
1027 else
1028 echo "WORKSPACE_HOME env var is not set"
1028 echo "WORKSPACE_HOME env var is not set"
1029 exit 1
1029 exit 1
1030 fi
1030 fi
1031
1031
1032 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
1032 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
1033
1033
1034 eval "
1034 eval "
1035 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME \
1035 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME \
1036 ./rcstack stack --env-file-path $env_file rhodecode -f docker-compose-apps.dev.yaml \
1036 ./rcstack stack --env-file-path $env_file rhodecode -f docker-compose-apps.dev.yaml \
1037 run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_sh --rm --use-aliases \
1037 run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_sh --rm --use-aliases \
1038 --publish 10020:10020 --rm --use-aliases \
1038 --publish 10020:10020 --rm --use-aliases \
1039 --workdir=\"/home/rhodecode/rhodecode-enterprise-ce\" \
1039 --workdir=\"/home/rhodecode/rhodecode-enterprise-ce\" \
1040 --interactive --tty \
1040 --interactive --tty \
1041 --name=\"$container_name\" rhodecode bash $dev_env_file"
1041 --name=\"$container_name\" rhodecode bash $dev_env_file"
1042
1042
1043 }
1043 }
1044
1044
1045 # :command.function
1045 # :command.function
1046 dev_tools_svn_command() {
1046 dev_tools_svn_command() {
1047 # src/svn_command.sh
1047 # src/svn_command.sh
1048 container_name=dev-svn
1048 container_name=dev-svn
1049
1049
1050 docker ps -q --filter "name=$container_name" | grep -q . && echo $container_name found || echo $container_name not found
1050 docker ps -q --filter "name=$container_name" | grep -q . && echo $container_name found || echo $container_name not found
1051 docker ps -q --filter "name=$container_name" | grep -q . && docker stop -t 120 $container_name && docker rm -fv $container_name
1051 docker ps -q --filter "name=$container_name" | grep -q . && docker stop -t 120 $container_name && docker rm -fv $container_name
1052
1052
1053 if [[ -v WORKSPACE_HOME ]];
1053 if [[ -v WORKSPACE_HOME ]];
1054 then
1054 then
1055 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
1055 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
1056 else
1056 else
1057 echo "WORKSPACE_HOME env var is not set"
1057 echo "WORKSPACE_HOME env var is not set"
1058 exit 1
1058 exit 1
1059 fi
1059 fi
1060
1060
1061 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
1061 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
1062
1062
1063 eval "
1063 eval "
1064 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME \
1064 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME \
1065 ./rcstack stack --env-file-path .custom/.dev.env rhodecode -f docker-compose-apps.dev.yaml \
1065 ./rcstack stack --env-file-path .custom/.dev.env rhodecode -f docker-compose-apps.dev.yaml \
1066 run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_svn_bash \
1066 run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_svn_bash \
1067 --rm --use-aliases \
1067 --rm --use-aliases \
1068 --workdir=\"/home/rhodecode\" \
1068 --workdir=\"/home/rhodecode\" \
1069 --interactive --tty \
1069 --interactive --tty \
1070 --name=\"$container_name\" svn bash"
1070 --name=\"$container_name\" svn bash"
1071
1071
1072 }
1072 }
1073
1073
1074 # :command.function
1074 # :command.function
1075 dev_tools_celery_command() {
1075 dev_tools_celery_command() {
1076 # src/celery_command.sh
1076 # src/celery_command.sh
1077 if [[ -v WORKSPACE_HOME ]];
1077 if [[ -v WORKSPACE_HOME ]];
1078 then
1078 then
1079 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
1079 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
1080 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
1080 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
1081 else
1081 else
1082 echo "WORKSPACE_HOME env var is not set"
1082 echo "WORKSPACE_HOME env var is not set"
1083 exit 1
1083 exit 1
1084 fi
1084 fi
1085
1085
1086 code_workdir=${args[--workdir]}
1086 code_workdir=${args[--workdir]}
1087 cmd_script=${args[--cmd]}
1087 cmd_script=${args[--cmd]}
1088
1088
1089 exec_script=$WORKSPACE_HOME/$cmd_script
1089 exec_script=$WORKSPACE_HOME/$cmd_script
1090 container_name=dev-celery
1090 container_name=dev-celery
1091 env_file=".custom/.dev.env"
1091 env_file=".custom/.dev.env"
1092
1092
1093 echo "Using exec script: $exec_script"
1093 echo "Using exec script: $exec_script"
1094
1094
1095 RC_DEV_CMD_HELP="celery --no-color --app=rhodecode.lib.celerylib.loader worker --autoscale=4,2 --max-tasks-per-child=100 --task-events --loglevel=DEBUG --ini=.dev/dev.ini"
1095 RC_DEV_CMD_HELP="celery --no-color --app=rhodecode.lib.celerylib.loader worker --autoscale=4,2 --max-tasks-per-child=100 --task-events --loglevel=DEBUG --ini=.dev/dev.ini"
1096
1096
1097 if [[ ! -f $exec_script ]]; then
1097 if [[ ! -f $exec_script ]]; then
1098 echo "Generating new $exec_script file..."
1098 echo "Generating new $exec_script file..."
1099 mkdir -p $(dirname $exec_script)
1099 mkdir -p $(dirname $exec_script)
1100
1100
1101 cat <<< "
1101 cat <<< "
1102 # Generated dev-env script for celery
1102 # Generated dev-env script for celery
1103
1103
1104 echo \"Run celery dev using the following command:\"
1104 echo \"Run celery dev using the following command:\"
1105 echo \"++++++++++++++++++++++++++++++++++++++++++++++++++\"
1105 echo \"++++++++++++++++++++++++++++++++++++++++++++++++++\"
1106 echo \"$RC_DEV_CMD_HELP\"
1106 echo \"$RC_DEV_CMD_HELP\"
1107 echo \"++++++++++++++++++++++++++++++++++++++++++++++++++\"
1107 echo \"++++++++++++++++++++++++++++++++++++++++++++++++++\"
1108 make sh
1108 make sh
1109 " > $exec_script
1109 " > $exec_script
1110 chmod +x $exec_script
1110 chmod +x $exec_script
1111 fi
1111 fi
1112
1112
1113 docker_exec_script="/var/opt/rhodecode_repo_store/$cmd_script"
1113 docker_exec_script="/var/opt/rhodecode_repo_store/$cmd_script"
1114
1114
1115 docker_id=$(docker ps -q --filter "name=$container_name")
1115 docker_id=$(docker ps -q --filter "name=$container_name" --filter name="rc_cluster_apps-celery")
1116
1116
1117 if [[ $docker_id ]]; then
1117 if [[ $docker_id ]]; then
1118 echo $container_name FOUND, Killing old one !
1118 echo $container_name FOUND, Killing old one !
1119 docker kill -s 9 $docker_id
1119 docker kill -s 9 $docker_id
1120 sleep 5
1120 sleep 5
1121 docker rm -fv $container_name
1121 docker rm -fv $container_name
1122 echo "done..."
1122 echo "done..."
1123 else
1123 else
1124 echo $container_name not found
1124 echo $container_name not found
1125 fi
1125 fi
1126
1126
1127 eval "
1127 eval "
1128 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME RC_DEV_CMD_HELP=\"$RC_DEV_CMD_HELP\" \
1128 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME RC_DEV_CMD_HELP=\"$RC_DEV_CMD_HELP\" \
1129 ./rcstack stack --env-file-path $env_file rhodecode -f docker-compose-apps.dev.yaml \
1129 ./rcstack stack --env-file-path $env_file rhodecode -f docker-compose-apps.dev.yaml \
1130 run -e RC_DEV_CMD_HELP=\"'$RC_DEV_CMD_HELP'\" -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_$container_name --rm --use-aliases \
1130 run -e RC_DEV_CMD_HELP=\"'$RC_DEV_CMD_HELP'\" -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_$container_name --rm --use-aliases \
1131 --workdir=\"$code_workdir\" \
1131 --workdir=\"$code_workdir\" \
1132 --name=\"$container_name\" \
1132 --name=\"$container_name\" \
1133 --interactive --tty \
1133 --interactive --tty \
1134 rhodecode bash $docker_exec_script"
1134 rhodecode bash $docker_exec_script"
1135
1135
1136 }
1136 }
1137
1137
1138 # :command.function
1138 # :command.function
1139 dev_tools_celeryd_command() {
1139 dev_tools_celeryd_command() {
1140 # src/celeryd_command.sh
1140 # src/celeryd_command.sh
1141 if [[ -v WORKSPACE_HOME ]];
1141 if [[ -v WORKSPACE_HOME ]];
1142 then
1142 then
1143 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
1143 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
1144 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
1144 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
1145 else
1145 else
1146 echo "WORKSPACE_HOME env var is not set"
1146 echo "WORKSPACE_HOME env var is not set"
1147 exit 1
1147 exit 1
1148 fi
1148 fi
1149
1149
1150 code_workdir=${args[--workdir]}
1150 code_workdir=${args[--workdir]}
1151 cmd_script=${args[--cmd]}
1151 cmd_script=${args[--cmd]}
1152
1152
1153 exec_script=$WORKSPACE_HOME/$cmd_script
1153 exec_script=$WORKSPACE_HOME/$cmd_script
1154 container_name=dev-celeryd
1154 container_name=dev-celeryd
1155 env_file=".custom/.dev.env"
1155 env_file=".custom/.dev.env"
1156
1156
1157 echo "Using exec script: $exec_script"
1157 echo "Using exec script: $exec_script"
1158
1158
1159 RC_DEV_CMD_HELP=""
1159 RC_DEV_CMD_HELP=""
1160
1160
1161 if [[ ! -f $exec_script ]]; then
1161 if [[ ! -f $exec_script ]]; then
1162 echo "Generating new $exec_script file..."
1162 echo "Generating new $exec_script file..."
1163 mkdir -p $(dirname $exec_script)
1163 mkdir -p $(dirname $exec_script)
1164
1164
1165 cat <<< "
1165 cat <<< "
1166 # Generated dev-env script for celeryd
1166 # Generated dev-env script for celeryd
1167
1167
1168 echo \"Run celery dev using the following command:\"
1168 echo \"Run celery dev using the following command:\"
1169 make dev-env && celery --no-color --app=rhodecode.lib.celerylib.loader worker --autoscale=4,2 --max-tasks-per-child=100 --task-events --loglevel=DEBUG --ini=.dev/dev.ini
1169 make dev-env && celery --no-color --app=rhodecode.lib.celerylib.loader worker --autoscale=4,2 --max-tasks-per-child=100 --task-events --loglevel=DEBUG --ini=.dev/dev.ini
1170 " > $exec_script
1170 " > $exec_script
1171 chmod +x $exec_script
1171 chmod +x $exec_script
1172 fi
1172 fi
1173
1173
1174 docker_exec_script="/var/opt/rhodecode_repo_store/$cmd_script"
1174 docker_exec_script="/var/opt/rhodecode_repo_store/$cmd_script"
1175
1175
1176 docker_id=$(docker ps -q --filter "name=$container_name")
1176 docker_id=$(docker ps -q --filter "name=$container_name" --filter name="rc_cluster_apps-celery")
1177
1177
1178 if [[ $docker_id ]]; then
1178 if [[ $docker_id ]]; then
1179 echo $container_name FOUND, Killing old one !
1179 echo $container_name FOUND, Killing old one !
1180 docker kill -s 9 $docker_id
1180 docker kill -s 9 $docker_id
1181 sleep 5
1181 sleep 5
1182 docker rm -fv $container_name
1182 docker rm -fv $container_name
1183 echo "done..."
1183 echo "done..."
1184 else
1184 else
1185 echo $container_name not found
1185 echo $container_name not found
1186 fi
1186 fi
1187
1187
1188 eval "
1188 eval "
1189 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME RC_DEV_CMD_HELP=\"$RC_DEV_CMD_HELP\" \
1189 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME RC_DEV_CMD_HELP=\"$RC_DEV_CMD_HELP\" \
1190 ./rcstack stack --env-file-path $env_file rhodecode -f docker-compose-apps.dev.yaml \
1190 ./rcstack stack --env-file-path $env_file rhodecode -f docker-compose-apps.dev.yaml \
1191 run -e RC_DEV_CMD_HELP=\"'$RC_DEV_CMD_HELP'\" -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_$container_name --rm --use-aliases \
1191 run -e RC_DEV_CMD_HELP=\"'$RC_DEV_CMD_HELP'\" -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_$container_name --rm --use-aliases \
1192 --workdir=\"$code_workdir\" \
1192 --workdir=\"$code_workdir\" \
1193 --name=\"$container_name\" \
1193 --name=\"$container_name\" \
1194 --detach \
1194 --detach \
1195 rhodecode $docker_exec_script"
1195 rhodecode $docker_exec_script"
1196
1196
1197 }
1197 }
1198
1198
1199 # :command.function
1199 # :command.function
1200 dev_tools_ssh_command() {
1200 dev_tools_ssh_command() {
1201 # src/ssh_command.sh
1201 # src/ssh_command.sh
1202 if [[ -v WORKSPACE_HOME ]];
1202 if [[ -v WORKSPACE_HOME ]];
1203 then
1203 then
1204 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
1204 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
1205 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
1205 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
1206 else
1206 else
1207 echo "WORKSPACE_HOME env var is not set"
1207 echo "WORKSPACE_HOME env var is not set"
1208 exit 1
1208 exit 1
1209 fi
1209 fi
1210
1210
1211 code_workdir=${args[--workdir]}
1211 code_workdir=${args[--workdir]}
1212 cmd_script=${args[--cmd]}
1212 cmd_script=${args[--cmd]}
1213
1213
1214 exec_script=$WORKSPACE_HOME/$cmd_script
1214 exec_script=$WORKSPACE_HOME/$cmd_script
1215 container_name=dev-ssh
1215 container_name=dev-ssh
1216 env_file=".custom/.dev.env"
1216 env_file=".custom/.dev.env"
1217
1217
1218 echo "Using exec script: $exec_script"
1218 echo "Using exec script: $exec_script"
1219
1219
1220 RC_DEV_CMD_HELP="mkdir -p /run/sshd && /usr/sbin/sshd -f /etc/rhodecode/sshd_config -D -e"
1220 RC_DEV_CMD_HELP="mkdir -p /run/sshd && /usr/sbin/sshd -f /etc/rhodecode/sshd_config -D -e"
1221
1221
1222 if [[ ! -f $exec_script ]]; then
1222 if [[ ! -f $exec_script ]]; then
1223 echo "Generating new $exec_script file..."
1223 echo "Generating new $exec_script file..."
1224 mkdir -p $(dirname $exec_script)
1224 mkdir -p $(dirname $exec_script)
1225
1225
1226 cat <<< "
1226 cat <<< "
1227 # Generated dev-env script for ssh
1227 # Generated dev-env script for ssh
1228
1228
1229 echo \"Run ssh dev using the following command:\"
1229 echo \"Run ssh dev using the following command:\"
1230 echo \"++++++++++++++++++++++++++++++++++++++++++++++++++\"
1230 echo \"++++++++++++++++++++++++++++++++++++++++++++++++++\"
1231 echo \"$RC_DEV_CMD_HELP\"
1231 echo \"$RC_DEV_CMD_HELP\"
1232 echo \"++++++++++++++++++++++++++++++++++++++++++++++++++\"
1232 echo \"++++++++++++++++++++++++++++++++++++++++++++++++++\"
1233 make sh
1233 make sh
1234 " > $exec_script
1234 " > $exec_script
1235 chmod +x $exec_script
1235 chmod +x $exec_script
1236 fi
1236 fi
1237
1237
1238 docker_exec_script="/var/opt/rhodecode_repo_store/$cmd_script"
1238 docker_exec_script="/var/opt/rhodecode_repo_store/$cmd_script"
1239
1239
1240 docker_id=$(docker ps -q --filter "name=$container_name")
1240 docker_id=$(docker ps -q --filter "name=$container_name" --filter name="rc_cluster_apps-sshd")
1241
1241
1242 if [[ $docker_id ]]; then
1242 if [[ $docker_id ]]; then
1243 echo $container_name FOUND, Killing old one !
1243 echo $container_name FOUND, Killing old one !
1244 docker kill -s 9 $docker_id
1244 docker kill -s 9 $docker_id
1245 sleep 5
1245 sleep 5
1246 docker rm -fv $container_name
1246 docker rm -fv $container_name
1247 echo "done..."
1247 echo "done..."
1248 else
1248 else
1249 echo $container_name not found
1249 echo $container_name not found
1250 fi
1250 fi
1251
1251
1252 RC_SSH_PORT=9022
1252 RC_SSH_PORT=9022
1253
1253
1254 eval "
1254 eval "
1255 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME RC_DEV_CMD_HELP=\"$RC_DEV_CMD_HELP\" \
1255 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME RC_DEV_CMD_HELP=\"$RC_DEV_CMD_HELP\" \
1256 ./rcstack stack --env-file-path $env_file rhodecode -f docker-compose-apps.dev.yaml \
1256 ./rcstack stack --env-file-path $env_file rhodecode -f docker-compose-apps.dev.yaml \
1257 run -e RC_DEV_CMD_HELP=\"'$RC_DEV_CMD_HELP'\" -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_$container_name --rm --use-aliases \
1257 run -e RC_DEV_CMD_HELP=\"'$RC_DEV_CMD_HELP'\" -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_$container_name --rm --use-aliases \
1258 --workdir=\"$code_workdir\" \
1258 --workdir=\"$code_workdir\" \
1259 --name=\"$container_name\" \
1259 --name=\"$container_name\" \
1260 --interactive --tty \
1260 --interactive --tty \
1261 --publish $RC_SSH_PORT:$RC_SSH_PORT \
1261 --publish $RC_SSH_PORT:$RC_SSH_PORT \
1262 sshd bash $docker_exec_script"
1262 sshd bash $docker_exec_script"
1263
1263
1264 }
1264 }
1265
1265
1266 # :command.function
1266 # :command.function
1267 dev_tools_sshd_command() {
1267 dev_tools_sshd_command() {
1268 # src/sshd_command.sh
1268 # src/sshd_command.sh
1269 if [[ -v WORKSPACE_HOME ]];
1269 if [[ -v WORKSPACE_HOME ]];
1270 then
1270 then
1271 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
1271 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
1272 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
1272 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
1273 else
1273 else
1274 echo "WORKSPACE_HOME env var is not set"
1274 echo "WORKSPACE_HOME env var is not set"
1275 exit 1
1275 exit 1
1276 fi
1276 fi
1277
1277
1278 code_workdir=${args[--workdir]}
1278 code_workdir=${args[--workdir]}
1279 cmd_script=${args[--cmd]}
1279 cmd_script=${args[--cmd]}
1280
1280
1281 exec_script=$WORKSPACE_HOME/$cmd_script
1281 exec_script=$WORKSPACE_HOME/$cmd_script
1282 container_name=dev-sshd
1282 container_name=dev-sshd
1283 env_file=".custom/.dev.env"
1283 env_file=".custom/.dev.env"
1284
1284
1285 echo "Using exec script: $exec_script"
1285 echo "Using exec script: $exec_script"
1286
1286
1287 RC_DEV_CMD_HELP=""
1287 RC_DEV_CMD_HELP=""
1288
1288
1289 if [[ ! -f $exec_script ]]; then
1289 if [[ ! -f $exec_script ]]; then
1290 echo "Generating new $exec_script file..."
1290 echo "Generating new $exec_script file..."
1291 mkdir -p $(dirname $exec_script)
1291 mkdir -p $(dirname $exec_script)
1292
1292
1293 cat <<< "
1293 cat <<< "
1294 # Generated dev-env script for ssh
1294 # Generated dev-env script for ssh
1295
1295
1296 echo \"Run ssh dev using the following command:\"
1296 echo \"Run ssh dev using the following command:\"
1297 make dev-env && mkdir -p /run/sshd && /usr/sbin/sshd -f /etc/rhodecode/sshd_config -D -e
1297 make dev-env && mkdir -p /run/sshd && /usr/sbin/sshd -f /etc/rhodecode/sshd_config -D -e
1298 " > $exec_script
1298 " > $exec_script
1299 chmod +x $exec_script
1299 chmod +x $exec_script
1300 fi
1300 fi
1301
1301
1302 docker_exec_script="/var/opt/rhodecode_repo_store/$cmd_script"
1302 docker_exec_script="/var/opt/rhodecode_repo_store/$cmd_script"
1303
1303
1304 docker_id=$(docker ps -q --filter "name=$container_name")
1304 docker_id=$(docker ps -q --filter "name=$container_name" --filter name="rc_cluster_apps-sshd")
1305
1305
1306 if [[ $docker_id ]]; then
1306 if [[ $docker_id ]]; then
1307 echo $container_name FOUND, Killing old one !
1307 echo $container_name FOUND, Killing old one !
1308 docker kill -s 9 $docker_id
1308 docker kill -s 9 $docker_id
1309 sleep 5
1309 sleep 5
1310 docker rm -fv $container_name
1310 docker rm -fv $container_name
1311 echo "done..."
1311 echo "done..."
1312 else
1312 else
1313 echo $container_name not found
1313 echo $container_name not found
1314 fi
1314 fi
1315
1315
1316 RC_SSH_PORT=9022
1316 RC_SSH_PORT=9022
1317
1317
1318 eval "
1318 eval "
1319 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME RC_DEV_CMD_HELP=\"$RC_DEV_CMD_HELP\" \
1319 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME RC_DEV_CMD_HELP=\"$RC_DEV_CMD_HELP\" \
1320 ./rcstack stack --env-file-path $env_file rhodecode -f docker-compose-apps.dev.yaml \
1320 ./rcstack stack --env-file-path $env_file rhodecode -f docker-compose-apps.dev.yaml \
1321 run -e RC_DEV_CMD_HELP=\"'$RC_DEV_CMD_HELP'\" -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_$container_name --rm --use-aliases \
1321 run -e RC_DEV_CMD_HELP=\"'$RC_DEV_CMD_HELP'\" -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_$container_name --rm --use-aliases \
1322 --workdir=\"$code_workdir\" \
1322 --workdir=\"$code_workdir\" \
1323 --name=\"$container_name\" \
1323 --name=\"$container_name\" \
1324 --detach \
1324 --detach \
1325 --publish $RC_SSH_PORT:$RC_SSH_PORT \
1325 --publish $RC_SSH_PORT:$RC_SSH_PORT \
1326 sshd $docker_exec_script"
1326 sshd $docker_exec_script"
1327
1327
1328 }
1328 }
1329
1329
1330 # :command.function
1330 # :command.function
1331 dev_tools_tools_command() {
1331 dev_tools_tools_command() {
1332 # src/tools_command.sh
1332 # src/tools_command.sh
1333 container_name=dev-tools
1333 container_name=dev-tools
1334
1334
1335 docker ps -q --filter "name=$container_name" | grep -q . && echo $container_name found || echo $container_name not found
1335 docker ps -q --filter "name=$container_name" | grep -q . && echo $container_name found || echo $container_name not found
1336 docker ps -q --filter "name=$container_name" | grep -q . && docker stop -t 120 $container_name && docker rm -fv $container_name
1336 docker ps -q --filter "name=$container_name" | grep -q . && docker stop -t 120 $container_name && docker rm -fv $container_name
1337
1337
1338 if [[ -v WORKSPACE_HOME ]];
1338 if [[ -v WORKSPACE_HOME ]];
1339 then
1339 then
1340 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
1340 DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME
1341 else
1341 else
1342 echo "WORKSPACE_HOME env var is not set"
1342 echo "WORKSPACE_HOME env var is not set"
1343 exit 1
1343 exit 1
1344 fi
1344 fi
1345
1345
1346 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
1346 echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME"
1347
1347
1348 eval "
1348 eval "
1349 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME \
1349 WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME \
1350 ./rcstack stack --env-file-path .custom/.dev.env rhodecode -f docker-compose-apps.dev.yaml \
1350 ./rcstack stack --env-file-path .custom/.dev.env rhodecode -f docker-compose-apps.dev.yaml \
1351 run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_tools_bash \
1351 run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_tools_bash \
1352 --rm --use-aliases \
1352 --rm --use-aliases \
1353 --workdir=\"/home/rhodecode/rhodecode-tools-ce\" \
1353 --workdir=\"/home/rhodecode/rhodecode-tools-ce\" \
1354 --interactive --tty \
1354 --interactive --tty \
1355 --name=\"$container_name\" rhodecode bash /home/rhodecode/rhodecode-tools-ce/.dev/dev-env.sh"
1355 --name=\"$container_name\" rhodecode bash /home/rhodecode/rhodecode-tools-ce/.dev/dev-env.sh"
1356
1356
1357 }
1357 }
1358
1358
1359 # :command.function
1359 # :command.function
1360 dev_tools_dev_env_command() {
1360 dev_tools_dev_env_command() {
1361 # src/dev_env_command.sh
1361 # src/dev_env_command.sh
1362 eval " \
1362 eval " \
1363 ./rcstack stack metrics up --detach statsd-exporter && \
1363 ./rcstack stack metrics up --detach statsd-exporter && \
1364 ./rcstack stack services up --detach && \
1364 ./rcstack stack services up --detach && \
1365 ./rcstack stack services up --detach httpbin && \
1365 ./rcstack stack services up --detach httpbin && \
1366 ./rcstack stack services up --detach ldap-server && \
1366 ./rcstack stack services up --detach ldap-server && \
1367 ./rcstack stack rhodecode up --detach svn && \
1367 ./rcstack stack rhodecode up --detach svn && \
1368 ./dev-tools celeryd && \
1368 ./rcstack stack rhodecode up --detach celery celery-beat && \
1369 ./dev-tools sshd && \
1369 ./rcstack stack rhodecode up --detach sshd && \
1370 ./rcstack status"
1370 ./rcstack status"
1371 }
1371 }
1372
1372
1373 # :command.function
1373 # :command.function
1374 dev_tools_prune_command() {
1374 dev_tools_prune_command() {
1375 # src/prune_command.sh
1375 # src/prune_command.sh
1376 docker container prune -f
1376 docker container prune -f
1377 docker image prune -f
1377 docker image prune -f
1378 docker builder prune -f
1378 docker builder prune -f
1379 docker system df
1379 docker system df
1380 }
1380 }
1381
1381
1382 # :command.function
1382 # :command.function
1383 dev_tools_prune_all_command() {
1383 dev_tools_prune_all_command() {
1384 # src/prune_all_command.sh
1384 # src/prune_all_command.sh
1385 docker container prune -f
1385 docker container prune -f
1386 docker image prune -f
1386 docker image prune -f
1387 docker builder prune -f
1387 docker builder prune -f
1388 docker system prune -f
1388 docker system prune -f
1389 docker system df
1389 docker system df
1390 }
1390 }
1391
1391
1392 # :command.function
1392 # :command.function
1393 dev_tools_cli_generate_pull_command() {
1393 dev_tools_cli_generate_pull_command() {
1394 # src/cli_generate_pull_command.sh
1394 # src/cli_generate_pull_command.sh
1395 docker pull $bashly_image
1395 docker pull $bashly_image
1396 }
1396 }
1397
1397
1398 # :command.function
1398 # :command.function
1399 dev_tools_cli_generate_help_command() {
1399 dev_tools_cli_generate_help_command() {
1400 # src/cli_generate_help_command.sh
1400 # src/cli_generate_help_command.sh
1401 source_dir=/media/psf/Home/workspace/rcstack-cli-modules/dev-tools
1401 source_dir=/media/psf/Home/workspace/rcstack-cli-modules/dev-tools
1402 target_dir=/media/psf/Home/workspace/rhodecode-docker/scripts/dev-tools
1402 target_dir=/media/psf/Home/workspace/rhodecode-docker/scripts/dev-tools
1403
1403
1404 echo "To pull latest image:"
1404 echo "To pull latest image:"
1405 echo " docker pull $bashly_image"
1405 echo " docker pull $bashly_image"
1406
1406
1407 echo "To run generation manually:"
1407 echo "To run generation manually:"
1408 echo " docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate"
1408 echo " docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate"
1409
1409
1410 echo "To upgrade builting scripts:"
1410 echo "To upgrade builting scripts:"
1411 echo " docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --upgrade"
1411 echo " docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --upgrade"
1412
1412
1413 #bashly generate --upgrade
1413 #bashly generate --upgrade
1414
1414
1415 # bashly add completions_script && source ./completions.bash
1415 # bashly add completions_script && source ./completions.bash
1416
1416
1417 #alias bashly='docker run --rm -it --user $(id -u):$(id -g) --volume "$PWD:/app" dannyben/bashly:edge'
1417 #alias bashly='docker run --rm -it --user $(id -u):$(id -g) --volume "$PWD:/app" dannyben/bashly:edge'
1418 }
1418 }
1419
1419
1420 # :command.function
1420 # :command.function
1421 dev_tools_stack_cli_version_command() {
1421 dev_tools_stack_cli_version_command() {
1422 # src/stack_cli_version_command.sh
1422 # src/stack_cli_version_command.sh
1423 version=${args[version]}
1423 version=${args[version]}
1424 version_file=$(pwd)/VERSION
1424 version_file=$(pwd)/VERSION
1425 yaml_file=$(pwd)/scripts/rcstack/src/bashly.yml
1425 yaml_file=$(pwd)/scripts/rcstack/src/bashly.yml
1426
1426
1427 echo "Setting $version to $version_file"
1427 echo "Setting $version to $version_file"
1428 echo -n $version > $version_file
1428 echo -n $version > $version_file
1429
1429
1430 echo "Setting $version to $yaml_file"
1430 echo "Setting $version to $yaml_file"
1431 sed -i -E "s/version:.+/version: $version/" $yaml_file
1431 sed -i -E "s/version:.+/version: $version/" $yaml_file
1432
1432
1433 }
1433 }
1434
1434
1435 # :command.function
1435 # :command.function
1436 dev_tools_cli_generate_rc_command() {
1436 dev_tools_cli_generate_rc_command() {
1437 # src/cli_generate_rc_command.sh
1437 # src/cli_generate_rc_command.sh
1438 one_time=${args[--one-time]}
1438 one_time=${args[--one-time]}
1439
1439
1440 echo "Using scripts/scripts/rcstack/bashly.yaml @ $bashly_image"
1440 echo "Using scripts/scripts/rcstack/bashly.yaml @ $bashly_image"
1441 source_dir=/media/psf/Home/workspace/rcstack-cli-modules/rcstack
1441 source_dir=/media/psf/Home/workspace/rcstack-cli-modules/rcstack
1442 target_dir=/media/psf/Home/workspace/rhodecode-docker/scripts/rcstack
1442 target_dir=/media/psf/Home/workspace/rhodecode-docker/scripts/rcstack
1443
1443
1444 if [[ $one_time ]]; then
1444 if [[ $one_time ]]; then
1445 docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --upgrade
1445 docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --upgrade
1446 else
1446 else
1447 docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --watch
1447 docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --watch
1448 fi
1448 fi
1449
1449
1450 }
1450 }
1451
1451
1452 # :command.function
1452 # :command.function
1453 dev_tools_cli_generate_dev_command() {
1453 dev_tools_cli_generate_dev_command() {
1454 # src/cli_generate_dev_command.sh
1454 # src/cli_generate_dev_command.sh
1455 one_time=${args[--one-time]}
1455 one_time=${args[--one-time]}
1456
1456
1457 echo "Using scripts/dev-tools/bashly.yaml @ $bashly_image"
1457 echo "Using scripts/dev-tools/bashly.yaml @ $bashly_image"
1458 source_dir=/media/psf/Home/workspace/rcstack-cli-modules/dev-tools
1458 source_dir=/media/psf/Home/workspace/rcstack-cli-modules/dev-tools
1459 target_dir=/media/psf/Home/workspace/rhodecode-docker/scripts/dev-tools
1459 target_dir=/media/psf/Home/workspace/rhodecode-docker/scripts/dev-tools
1460
1460
1461 if [[ $one_time ]]; then
1461 if [[ $one_time ]]; then
1462 docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --upgrade
1462 docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --upgrade
1463 else
1463 else
1464 docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --watch
1464 docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --watch
1465 fi
1465 fi
1466
1466
1467 }
1467 }
1468
1468
1469 # :command.function
1469 # :command.function
1470 dev_tools_get_build_artifacts_command() {
1470 dev_tools_get_build_artifacts_command() {
1471 # src/get_build_artifacts_command.sh
1471 # src/get_build_artifacts_command.sh
1472
1472
1473 DEBUG=${args[--debug]}
1473 DEBUG=${args[--debug]}
1474 AUTH=${args[--auth]}
1474 AUTH=${args[--auth]}
1475 INSTALLER_URL=${args[--installer-url]}
1475 INSTALLER_URL=${args[--installer-url]}
1476 MANIFEST_URL=${args[--manifest-url]}
1476 MANIFEST_URL=${args[--manifest-url]}
1477 RC_VERSION=${args[--version-name]}
1477 RC_VERSION=${args[--version-name]}
1478 VER=$RC_VERSION
1478 VER=$RC_VERSION
1479
1479
1480 CACHE_DIR=$PWD/.cache
1480 CACHE_DIR=$PWD/.cache
1481 VER_REGEX="$VER+x86_64"
1481 VER_REGEX="$VER+x86_64"
1482
1482
1483 if [[ $VER == "" ]]; then
1483 if [[ $VER == "" ]]; then
1484 msg="Version is empty, please set --version-name correctly"
1484 msg="Version is empty, please set --version-name correctly"
1485 echo "$(red $msg)"
1485 echo "$(red $msg)"
1486 exit 1
1486 exit 1
1487 fi
1487 fi
1488
1488
1489 echo "Downloading Artifacts for version: $VER"
1489 echo "Downloading Artifacts for version: $VER"
1490 mkdir -p $CACHE_DIR
1490 mkdir -p $CACHE_DIR
1491
1491
1492 echo "1/4 Checking available downloads from MANIFEST file"
1492 echo "1/4 Checking available downloads from MANIFEST file"
1493
1493
1494 ARTS=$(curl -s $AUTH $MANIFEST_URL | grep --ignore-case "$VER_REGEX" | cut -d ' ' -f 2)
1494 ARTS=$(curl -s $AUTH $MANIFEST_URL | grep --ignore-case "$VER_REGEX" | cut -d ' ' -f 2)
1495
1495
1496 if [[ $DEBUG ]]; then
1496 if [[ $DEBUG ]]; then
1497 echo "DEBUG START"
1497 echo "DEBUG START"
1498 curl -s $AUTH $MANIFEST_URL | grep --ignore-case "$VER_REGEX" || echo "no regex match"
1498 curl -s $AUTH $MANIFEST_URL | grep --ignore-case "$VER_REGEX" || echo "no regex match"
1499 curl -s $AUTH $MANIFEST_URL | grep --ignore-case "$VER_REGEX" | cut -d ' ' -f 2
1499 curl -s $AUTH $MANIFEST_URL | grep --ignore-case "$VER_REGEX" | cut -d ' ' -f 2
1500 echo "Found following artifacts:"
1500 echo "Found following artifacts:"
1501 echo $ARTS
1501 echo $ARTS
1502 echo "DEBUG END"
1502 echo "DEBUG END"
1503 fi
1503 fi
1504
1504
1505 if [[ $ARTS == "" ]]; then
1505 if [[ $ARTS == "" ]]; then
1506 MSG="Failed to found any MANIFEST entries for version $VER make sure there exists release with that version or use --version to specify different version"
1506 MSG="Failed to found any MANIFEST entries for version $VER make sure there exists release with that version or use --version to specify different version"
1507 echo "$(red $MSG)"
1507 echo "$(red $MSG)"
1508 exit 1
1508 exit 1
1509 fi
1509 fi
1510
1510
1511 echo "2/4 Downloading locale-archive"
1511 echo "2/4 Downloading locale-archive"
1512 curl -L https://dls.rhodecode.com/assets/locale-archive -J -O
1512 curl -L https://dls.rhodecode.com/assets/locale-archive -J -O
1513 mv -v locale-archive "$CACHE_DIR"
1513 mv -v locale-archive "$CACHE_DIR"
1514
1514
1515 # vcsserver/ce/ee
1515 # vcsserver/ce/ee
1516 echo "3/4 Downloading installer artifacts"
1516 echo "3/4 Downloading installer artifacts"
1517 for url in $ARTS; do
1517 for url in $ARTS; do
1518 echo "Downloading $url with $AUTH"
1518 echo "Downloading $url with $AUTH"
1519 curl $AUTH --fail-early -L ${url} -J -O
1519 curl $AUTH --fail-early -L ${url} -J -O
1520 done
1520 done
1521
1521
1522 #for url in $(curl -s $MANIFEST_URL | grep --ignore-case -E 'control.+\+x86_64' | cut -d ' ' -f 2); do
1522 #for url in $(curl -s $MANIFEST_URL | grep --ignore-case -E 'control.+\+x86_64' | cut -d ' ' -f 2); do
1523 # echo "Downloading $url"
1523 # echo "Downloading $url"
1524 # curl -L ${url} -J -O
1524 # curl -L ${url} -J -O
1525 #done
1525 #done
1526
1526
1527 echo "4/4 Downloading installer from $INSTALLER_URL"
1527 echo "4/4 Downloading installer from $INSTALLER_URL"
1528 curl $AUTH -L $INSTALLER_URL -J -O
1528 curl $AUTH -L $INSTALLER_URL -J -O
1529
1529
1530 INSTALLER=$(ls -Art RhodeCode-installer-* | tail -n 1)
1530 INSTALLER=$(ls -Art RhodeCode-installer-* | tail -n 1)
1531 if [[ -n $INSTALLER ]]; then
1531 if [[ -n $INSTALLER ]]; then
1532 chmod +x "${INSTALLER}"
1532 chmod +x "${INSTALLER}"
1533 fi
1533 fi
1534
1534
1535 echo "Copying artifacts into $CACHE_DIR"
1535 echo "Copying artifacts into $CACHE_DIR"
1536
1536
1537 mv -v "${INSTALLER}" $CACHE_DIR
1537 mv -v "${INSTALLER}" $CACHE_DIR
1538 mv -v *.bz2 $CACHE_DIR
1538 mv -v *.bz2 $CACHE_DIR
1539 ls -lh $CACHE_DIR
1539 ls -lh $CACHE_DIR
1540
1540
1541 }
1541 }
1542
1542
1543 # :command.function
1543 # :command.function
1544 dev_tools_build_installer_command() {
1544 dev_tools_build_installer_command() {
1545 # src/build_installer_command.sh
1545 # src/build_installer_command.sh
1546
1546
1547 rc_version=${args[--version-name]}
1547 rc_version=${args[--version-name]}
1548 export RC_VERSION=$rc_version
1548 export RC_VERSION=$rc_version
1549 eval "echo INSTALLER BASED BUILDING${RC_VERSION}"
1549 eval "echo INSTALLER BASED BUILDING${RC_VERSION}"
1550
1550
1551 RC_VERSION=$rc_version ./$RC_SCRIPT_NAME stack rhodecode build --progress plain rhodecode
1551 RC_VERSION=$rc_version ./$RC_SCRIPT_NAME stack rhodecode build --progress plain rhodecode
1552
1552
1553 }
1553 }
1554
1554
1555 # :command.function
1555 # :command.function
1556 dev_tools_get_build_source_command() {
1556 dev_tools_get_build_source_command() {
1557 # src/get_build_source_command.sh
1557 # src/get_build_source_command.sh
1558
1558
1559 DEBUG=${args[--debug]}
1559 DEBUG=${args[--debug]}
1560 AUTH_TOKEN=${args[--auth-token]}
1560 AUTH_TOKEN=${args[--auth-token]}
1561 SERVER_URL=${args[--server-url]}
1561 SERVER_URL=${args[--server-url]}
1562 revision=${args[--revision]}
1562 revision=${args[--revision]}
1563
1563
1564 SOURCE_DIR=$PWD/.source
1564 SOURCE_DIR=$PWD/.source
1565
1565
1566 RHODECODE_VCS_HASH=$revision
1566 RHODECODE_VCS_HASH=$revision
1567 RHODECODE_CE_HASH=$revision
1567 RHODECODE_CE_HASH=$revision
1568 RHODECODE_EE_HASH=$revision
1568 RHODECODE_EE_HASH=$revision
1569
1569
1570 # download sources
1570 # download sources
1571 echo "** download rhodecode source for build from $SERVER_URL using '$revision' hash **"
1571 echo "** download rhodecode source for build from $SERVER_URL using '$revision' hash **"
1572 mkdir -p $SOURCE_DIR
1572 mkdir -p $SOURCE_DIR
1573
1573
1574 echo "getting $SERVER_URL/rhodecode-vcsserver/archive/$RHODECODE_VCS_HASH.tgz"
1574 echo "getting $SERVER_URL/rhodecode-vcsserver/archive/$RHODECODE_VCS_HASH.tgz"
1575 curl --fail --header "X-Rc-Auth-Token: $AUTH_TOKEN" -L $SERVER_URL/rhodecode-vcsserver/archive/$RHODECODE_VCS_HASH.tgz?with_hash=0 | tar -xz -C $SOURCE_DIR
1575 curl --fail --header "X-Rc-Auth-Token: $AUTH_TOKEN" -L $SERVER_URL/rhodecode-vcsserver/archive/$RHODECODE_VCS_HASH.tgz?with_hash=0 | tar -xz -C $SOURCE_DIR
1576
1576
1577 echo "getting $SERVER_URL/rhodecode-enterprise-ce/archive/$RHODECODE_CE_HASH.tgz"
1577 echo "getting $SERVER_URL/rhodecode-enterprise-ce/archive/$RHODECODE_CE_HASH.tgz"
1578 curl --fail --header "X-Rc-Auth-Token: $AUTH_TOKEN" -L $SERVER_URL/rhodecode-enterprise-ce/archive/$RHODECODE_CE_HASH.tgz?with_hash=0 | tar -xz -C $SOURCE_DIR
1578 curl --fail --header "X-Rc-Auth-Token: $AUTH_TOKEN" -L $SERVER_URL/rhodecode-enterprise-ce/archive/$RHODECODE_CE_HASH.tgz?with_hash=0 | tar -xz -C $SOURCE_DIR
1579
1579
1580 echo "getting $SERVER_URL/rhodecode-enterprise-ee/archive/$RHODECODE_EE_HASH.tgz"
1580 echo "getting $SERVER_URL/rhodecode-enterprise-ee/archive/$RHODECODE_EE_HASH.tgz"
1581 curl --fail --header "X-Rc-Auth-Token: $AUTH_TOKEN" -L $SERVER_URL/rhodecode-enterprise-ee/archive/$RHODECODE_EE_HASH.tgz?with_hash=0 | tar -xz -C $SOURCE_DIR
1581 curl --fail --header "X-Rc-Auth-Token: $AUTH_TOKEN" -L $SERVER_URL/rhodecode-enterprise-ee/archive/$RHODECODE_EE_HASH.tgz?with_hash=0 | tar -xz -C $SOURCE_DIR
1582
1582
1583 rm -rf $SOURCE_DIR/rhodecode-vcsserver && \
1583 rm -rf $SOURCE_DIR/rhodecode-vcsserver && \
1584 mv $SOURCE_DIR/*rhodecode-vcsserver-* $SOURCE_DIR/rhodecode-vcsserver
1584 mv $SOURCE_DIR/*rhodecode-vcsserver-* $SOURCE_DIR/rhodecode-vcsserver
1585 rm -rf $SOURCE_DIR/rhodecode-vcsserver/.hg
1585 rm -rf $SOURCE_DIR/rhodecode-vcsserver/.hg
1586
1586
1587 rm -rf $SOURCE_DIR/rhodecode-enterprise-ce && \
1587 rm -rf $SOURCE_DIR/rhodecode-enterprise-ce && \
1588 mv $SOURCE_DIR/*rhodecode-enterprise-ce-* $SOURCE_DIR/rhodecode-enterprise-ce
1588 mv $SOURCE_DIR/*rhodecode-enterprise-ce-* $SOURCE_DIR/rhodecode-enterprise-ce
1589 rm -rf $SOURCE_DIR/rhodecode-enterprise-ce/.hg
1589 rm -rf $SOURCE_DIR/rhodecode-enterprise-ce/.hg
1590
1590
1591 rm -rf $SOURCE_DIR/rhodecode-enterprise-ee && \
1591 rm -rf $SOURCE_DIR/rhodecode-enterprise-ee && \
1592 mv $SOURCE_DIR/*rhodecode-enterprise-ee-* $SOURCE_DIR/rhodecode-enterprise-ee
1592 mv $SOURCE_DIR/*rhodecode-enterprise-ee-* $SOURCE_DIR/rhodecode-enterprise-ee
1593 rm -rf $SOURCE_DIR/rhodecode-enterprise-ee/.hg
1593 rm -rf $SOURCE_DIR/rhodecode-enterprise-ee/.hg
1594
1594
1595 echo "downloading sources done to $SOURCE_DIR, directory now consists:"
1595 echo "downloading sources done to $SOURCE_DIR, directory now consists:"
1596 ls -l $SOURCE_DIR
1596 ls -l $SOURCE_DIR
1597
1597
1598 echo ""
1598 echo ""
1599 date_formatted=$(date +%Y.%m.%d.1)
1599 date_formatted=$(date +%Y.%m.%d.1)
1600 echo "to create source based build run:"
1600 echo "to create source based build run:"
1601 echo " ./$RC_SCRIPT_NAME build-source --version-name 4.28.0.$date_formatted --tag beta"
1601 echo " ./$RC_SCRIPT_NAME build-source --version-name 4.28.0.$date_formatted --tag beta"
1602 echo " ./$RC_SCRIPT_NAME build-source --version-name 5.0.0.$date_formatted --tag beta"
1602 echo " ./$RC_SCRIPT_NAME build-source --version-name 5.0.0.$date_formatted --tag beta"
1603
1603
1604 }
1604 }
1605
1605
1606 # :command.function
1606 # :command.function
1607 dev_tools_build_source_command() {
1607 dev_tools_build_source_command() {
1608 # src/build_source_command.sh
1608 # src/build_source_command.sh
1609
1609
1610 rc_version=${args[--version-name]}
1610 rc_version=${args[--version-name]}
1611 source_build_yaml=${args[--source-build-yaml]}
1611 source_build_yaml=${args[--source-build-yaml]}
1612
1612
1613 eval "tags_data=(${args[--tag]})"
1613 eval "tags_data=(${args[--tag]})"
1614
1614
1615 export RC_VERSION=$rc_version
1615 export RC_VERSION=$rc_version
1616 export RC_EDITION=ee
1616 export RC_EDITION=ee
1617
1617
1618 VCS_SHA=$(cat .source/rhodecode-vcsserver/.archival.txt | grep commit_id | cut -d ":" -f 2 | cut -c 1-6)
1618 VCS_SHA=$(cat .source/rhodecode-vcsserver/.archival.txt | grep commit_id | cut -d ":" -f 2 | cut -c 1-6)
1619 CE_SHA=$(cat .source/rhodecode-enterprise-ce/.archival.txt | grep commit_id | cut -d ":" -f 2 | cut -c 1-6)
1619 CE_SHA=$(cat .source/rhodecode-enterprise-ce/.archival.txt | grep commit_id | cut -d ":" -f 2 | cut -c 1-6)
1620 EE_SHA=$(cat .source/rhodecode-enterprise-ee/.archival.txt | grep commit_id | cut -d ":" -f 2 | cut -c 1-6)
1620 EE_SHA=$(cat .source/rhodecode-enterprise-ee/.archival.txt | grep commit_id | cut -d ":" -f 2 | cut -c 1-6)
1621
1621
1622 echo "build_source: SOURCE BASED BUILDING: $rc_version @ vcs:$VCS_SHA ce:$CE_SHA ee:$EE_SHA"
1622 echo "build_source: SOURCE BASED BUILDING: $rc_version @ vcs:$VCS_SHA ce:$CE_SHA ee:$EE_SHA"
1623 echo "build_source: tags:" ${tags_data[@]}
1623 echo "build_source: tags:" ${tags_data[@]}
1624 echo ""
1624 echo ""
1625
1625
1626 RC_SCRIPT_NAME=rcstack
1626 RC_SCRIPT_NAME=rcstack
1627 DOCKER_SCAN_SUGGEST=false RC_VERSION=$rc_version \
1627 DOCKER_SCAN_SUGGEST=false RC_VERSION=$rc_version \
1628 ./$RC_SCRIPT_NAME stack rhodecode -f $source_build_yaml \
1628 ./$RC_SCRIPT_NAME stack rhodecode -f $source_build_yaml \
1629 --progress plain \
1629 --progress plain \
1630 build \
1630 build \
1631 --build-arg VCS_SHA=$VCS_SHA \
1631 --build-arg VCS_SHA=$VCS_SHA \
1632 --build-arg CE_SHA=$CE_SHA \
1632 --build-arg CE_SHA=$CE_SHA \
1633 --build-arg EE_SHA=$EE_SHA \
1633 --build-arg EE_SHA=$EE_SHA \
1634 rhodecode
1634 rhodecode
1635
1635
1636 # now tag the ee to ce
1636 # now tag the ee to ce
1637 docker tag rhodecode/rhodecode-ee:$rc_version rhodecode/rhodecode-ce:$rc_version
1637 docker tag rhodecode/rhodecode-ee:$rc_version rhodecode/rhodecode-ce:$rc_version
1638
1638
1639 # apply the tags
1639 # apply the tags
1640 for tag in "${tags_data[@]}"; do
1640 for tag in "${tags_data[@]}"; do
1641 echo "build_source: creating tag:$tag"
1641 echo "build_source: creating tag:$tag"
1642 docker tag rhodecode/rhodecode-ee:$rc_version rhodecode/rhodecode-ee:$tag
1642 docker tag rhodecode/rhodecode-ee:$rc_version rhodecode/rhodecode-ee:$tag
1643 docker tag rhodecode/rhodecode-ee:$rc_version rhodecode/rhodecode-ce:$tag
1643 docker tag rhodecode/rhodecode-ee:$rc_version rhodecode/rhodecode-ce:$tag
1644 done
1644 done
1645
1645
1646 echo "build_source: consider setting release version using"
1646 echo "build_source: consider setting release version using"
1647 echo " ./$RC_SCRIPT_NAME cli set-runtime-image $rc_version"
1647 echo " ./$RC_SCRIPT_NAME cli set-runtime-image $rc_version"
1648
1648
1649 echo "build_source: push this image using"
1649 echo "build_source: push this image using"
1650 echo " docker push rhodecode/rhodecode-ee:$rc_version"
1650 echo " docker push rhodecode/rhodecode-ee:$rc_version"
1651 echo " docker push rhodecode/rhodecode-ce:$rc_version"
1651 echo " docker push rhodecode/rhodecode-ce:$rc_version"
1652
1652
1653 for tag in "${tags_data[@]}"; do
1653 for tag in "${tags_data[@]}"; do
1654 echo " docker push rhodecode/rhodecode-ee:$tag"
1654 echo " docker push rhodecode/rhodecode-ee:$tag"
1655 echo " docker push rhodecode/rhodecode-ce:$tag"
1655 echo " docker push rhodecode/rhodecode-ce:$tag"
1656 done
1656 done
1657 }
1657 }
1658
1658
1659 # :command.parse_requirements
1659 # :command.parse_requirements
1660 parse_requirements() {
1660 parse_requirements() {
1661 # :command.fixed_flags_filter
1661 # :command.fixed_flags_filter
1662 while [[ $# -gt 0 ]]; do
1662 while [[ $# -gt 0 ]]; do
1663 case "${1:-}" in
1663 case "${1:-}" in
1664 --version | -v)
1664 --version | -v)
1665 version_command
1665 version_command
1666 exit
1666 exit
1667 ;;
1667 ;;
1668
1668
1669 --help | -h)
1669 --help | -h)
1670 long_usage=yes
1670 long_usage=yes
1671 dev_tools_usage
1671 dev_tools_usage
1672 exit
1672 exit
1673 ;;
1673 ;;
1674
1674
1675 *)
1675 *)
1676 break
1676 break
1677 ;;
1677 ;;
1678
1678
1679 esac
1679 esac
1680 done
1680 done
1681
1681
1682 # :command.command_filter
1682 # :command.command_filter
1683 action=${1:-}
1683 action=${1:-}
1684
1684
1685 case $action in
1685 case $action in
1686 -*) ;;
1686 -*) ;;
1687
1687
1688 vcs | v)
1688 vcs | v)
1689 action="vcs"
1689 action="vcs"
1690 shift
1690 shift
1691 dev_tools_vcs_parse_requirements "$@"
1691 dev_tools_vcs_parse_requirements "$@"
1692 shift $#
1692 shift $#
1693 ;;
1693 ;;
1694
1694
1695 ee | e)
1695 ee | e)
1696 action="ee"
1696 action="ee"
1697 shift
1697 shift
1698 dev_tools_ee_parse_requirements "$@"
1698 dev_tools_ee_parse_requirements "$@"
1699 shift $#
1699 shift $#
1700 ;;
1700 ;;
1701
1701
1702 ce | c)
1702 ce | c)
1703 action="ce"
1703 action="ce"
1704 shift
1704 shift
1705 dev_tools_ce_parse_requirements "$@"
1705 dev_tools_ce_parse_requirements "$@"
1706 shift $#
1706 shift $#
1707 ;;
1707 ;;
1708
1708
1709 svn | s)
1709 svn | s)
1710 action="svn"
1710 action="svn"
1711 shift
1711 shift
1712 dev_tools_svn_parse_requirements "$@"
1712 dev_tools_svn_parse_requirements "$@"
1713 shift $#
1713 shift $#
1714 ;;
1714 ;;
1715
1715
1716 celery)
1716 celery)
1717 action="celery"
1717 action="celery"
1718 shift
1718 shift
1719 dev_tools_celery_parse_requirements "$@"
1719 dev_tools_celery_parse_requirements "$@"
1720 shift $#
1720 shift $#
1721 ;;
1721 ;;
1722
1722
1723 celeryd)
1723 celeryd)
1724 action="celeryd"
1724 action="celeryd"
1725 shift
1725 shift
1726 dev_tools_celeryd_parse_requirements "$@"
1726 dev_tools_celeryd_parse_requirements "$@"
1727 shift $#
1727 shift $#
1728 ;;
1728 ;;
1729
1729
1730 ssh)
1730 ssh)
1731 action="ssh"
1731 action="ssh"
1732 shift
1732 shift
1733 dev_tools_ssh_parse_requirements "$@"
1733 dev_tools_ssh_parse_requirements "$@"
1734 shift $#
1734 shift $#
1735 ;;
1735 ;;
1736
1736
1737 sshd)
1737 sshd)
1738 action="sshd"
1738 action="sshd"
1739 shift
1739 shift
1740 dev_tools_sshd_parse_requirements "$@"
1740 dev_tools_sshd_parse_requirements "$@"
1741 shift $#
1741 shift $#
1742 ;;
1742 ;;
1743
1743
1744 tools | t)
1744 tools | t)
1745 action="tools"
1745 action="tools"
1746 shift
1746 shift
1747 dev_tools_tools_parse_requirements "$@"
1747 dev_tools_tools_parse_requirements "$@"
1748 shift $#
1748 shift $#
1749 ;;
1749 ;;
1750
1750
1751 dev-env)
1751 dev-env)
1752 action="dev-env"
1752 action="dev-env"
1753 shift
1753 shift
1754 dev_tools_dev_env_parse_requirements "$@"
1754 dev_tools_dev_env_parse_requirements "$@"
1755 shift $#
1755 shift $#
1756 ;;
1756 ;;
1757
1757
1758 prune)
1758 prune)
1759 action="prune"
1759 action="prune"
1760 shift
1760 shift
1761 dev_tools_prune_parse_requirements "$@"
1761 dev_tools_prune_parse_requirements "$@"
1762 shift $#
1762 shift $#
1763 ;;
1763 ;;
1764
1764
1765 prune-all)
1765 prune-all)
1766 action="prune-all"
1766 action="prune-all"
1767 shift
1767 shift
1768 dev_tools_prune_all_parse_requirements "$@"
1768 dev_tools_prune_all_parse_requirements "$@"
1769 shift $#
1769 shift $#
1770 ;;
1770 ;;
1771
1771
1772 cli-generate-pull)
1772 cli-generate-pull)
1773 action="cli-generate-pull"
1773 action="cli-generate-pull"
1774 shift
1774 shift
1775 dev_tools_cli_generate_pull_parse_requirements "$@"
1775 dev_tools_cli_generate_pull_parse_requirements "$@"
1776 shift $#
1776 shift $#
1777 ;;
1777 ;;
1778
1778
1779 cli-generate-help)
1779 cli-generate-help)
1780 action="cli-generate-help"
1780 action="cli-generate-help"
1781 shift
1781 shift
1782 dev_tools_cli_generate_help_parse_requirements "$@"
1782 dev_tools_cli_generate_help_parse_requirements "$@"
1783 shift $#
1783 shift $#
1784 ;;
1784 ;;
1785
1785
1786 stack-cli-version)
1786 stack-cli-version)
1787 action="stack-cli-version"
1787 action="stack-cli-version"
1788 shift
1788 shift
1789 dev_tools_stack_cli_version_parse_requirements "$@"
1789 dev_tools_stack_cli_version_parse_requirements "$@"
1790 shift $#
1790 shift $#
1791 ;;
1791 ;;
1792
1792
1793 cli-generate-rc)
1793 cli-generate-rc)
1794 action="cli-generate-rc"
1794 action="cli-generate-rc"
1795 shift
1795 shift
1796 dev_tools_cli_generate_rc_parse_requirements "$@"
1796 dev_tools_cli_generate_rc_parse_requirements "$@"
1797 shift $#
1797 shift $#
1798 ;;
1798 ;;
1799
1799
1800 cli-generate-dev)
1800 cli-generate-dev)
1801 action="cli-generate-dev"
1801 action="cli-generate-dev"
1802 shift
1802 shift
1803 dev_tools_cli_generate_dev_parse_requirements "$@"
1803 dev_tools_cli_generate_dev_parse_requirements "$@"
1804 shift $#
1804 shift $#
1805 ;;
1805 ;;
1806
1806
1807 get-build-artifacts)
1807 get-build-artifacts)
1808 action="get-build-artifacts"
1808 action="get-build-artifacts"
1809 shift
1809 shift
1810 dev_tools_get_build_artifacts_parse_requirements "$@"
1810 dev_tools_get_build_artifacts_parse_requirements "$@"
1811 shift $#
1811 shift $#
1812 ;;
1812 ;;
1813
1813
1814 build-installer)
1814 build-installer)
1815 action="build-installer"
1815 action="build-installer"
1816 shift
1816 shift
1817 dev_tools_build_installer_parse_requirements "$@"
1817 dev_tools_build_installer_parse_requirements "$@"
1818 shift $#
1818 shift $#
1819 ;;
1819 ;;
1820
1820
1821 get-build-source)
1821 get-build-source)
1822 action="get-build-source"
1822 action="get-build-source"
1823 shift
1823 shift
1824 dev_tools_get_build_source_parse_requirements "$@"
1824 dev_tools_get_build_source_parse_requirements "$@"
1825 shift $#
1825 shift $#
1826 ;;
1826 ;;
1827
1827
1828 build-source)
1828 build-source)
1829 action="build-source"
1829 action="build-source"
1830 shift
1830 shift
1831 dev_tools_build_source_parse_requirements "$@"
1831 dev_tools_build_source_parse_requirements "$@"
1832 shift $#
1832 shift $#
1833 ;;
1833 ;;
1834
1834
1835 # :command.command_fallback
1835 # :command.command_fallback
1836 "")
1836 "")
1837 dev_tools_usage >&2
1837 dev_tools_usage >&2
1838 exit 1
1838 exit 1
1839 ;;
1839 ;;
1840
1840
1841 *)
1841 *)
1842 printf "invalid command: %s\n" "$action" >&2
1842 printf "invalid command: %s\n" "$action" >&2
1843 exit 1
1843 exit 1
1844 ;;
1844 ;;
1845
1845
1846 esac
1846 esac
1847
1847
1848 # :command.parse_requirements_while
1848 # :command.parse_requirements_while
1849 while [[ $# -gt 0 ]]; do
1849 while [[ $# -gt 0 ]]; do
1850 key="$1"
1850 key="$1"
1851 case "$key" in
1851 case "$key" in
1852
1852
1853 -?*)
1853 -?*)
1854 printf "invalid option: %s\n" "$key" >&2
1854 printf "invalid option: %s\n" "$key" >&2
1855 exit 1
1855 exit 1
1856 ;;
1856 ;;
1857
1857
1858 *)
1858 *)
1859 # :command.parse_requirements_case
1859 # :command.parse_requirements_case
1860 # :command.parse_requirements_case_simple
1860 # :command.parse_requirements_case_simple
1861 printf "invalid argument: %s\n" "$key" >&2
1861 printf "invalid argument: %s\n" "$key" >&2
1862 exit 1
1862 exit 1
1863
1863
1864 ;;
1864 ;;
1865
1865
1866 esac
1866 esac
1867 done
1867 done
1868
1868
1869 }
1869 }
1870
1870
1871 # :command.parse_requirements
1871 # :command.parse_requirements
1872 dev_tools_vcs_parse_requirements() {
1872 dev_tools_vcs_parse_requirements() {
1873 # :command.fixed_flags_filter
1873 # :command.fixed_flags_filter
1874 while [[ $# -gt 0 ]]; do
1874 while [[ $# -gt 0 ]]; do
1875 case "${1:-}" in
1875 case "${1:-}" in
1876 --help | -h)
1876 --help | -h)
1877 long_usage=yes
1877 long_usage=yes
1878 dev_tools_vcs_usage
1878 dev_tools_vcs_usage
1879 exit
1879 exit
1880 ;;
1880 ;;
1881
1881
1882 *)
1882 *)
1883 break
1883 break
1884 ;;
1884 ;;
1885
1885
1886 esac
1886 esac
1887 done
1887 done
1888
1888
1889 # :command.command_filter
1889 # :command.command_filter
1890 action="vcs"
1890 action="vcs"
1891
1891
1892 # :command.parse_requirements_while
1892 # :command.parse_requirements_while
1893 while [[ $# -gt 0 ]]; do
1893 while [[ $# -gt 0 ]]; do
1894 key="$1"
1894 key="$1"
1895 case "$key" in
1895 case "$key" in
1896
1896
1897 -?*)
1897 -?*)
1898 printf "invalid option: %s\n" "$key" >&2
1898 printf "invalid option: %s\n" "$key" >&2
1899 exit 1
1899 exit 1
1900 ;;
1900 ;;
1901
1901
1902 *)
1902 *)
1903 # :command.parse_requirements_case
1903 # :command.parse_requirements_case
1904 # :command.parse_requirements_case_simple
1904 # :command.parse_requirements_case_simple
1905 printf "invalid argument: %s\n" "$key" >&2
1905 printf "invalid argument: %s\n" "$key" >&2
1906 exit 1
1906 exit 1
1907
1907
1908 ;;
1908 ;;
1909
1909
1910 esac
1910 esac
1911 done
1911 done
1912
1912
1913 }
1913 }
1914
1914
1915 # :command.parse_requirements
1915 # :command.parse_requirements
1916 dev_tools_ee_parse_requirements() {
1916 dev_tools_ee_parse_requirements() {
1917 # :command.fixed_flags_filter
1917 # :command.fixed_flags_filter
1918 while [[ $# -gt 0 ]]; do
1918 while [[ $# -gt 0 ]]; do
1919 case "${1:-}" in
1919 case "${1:-}" in
1920 --help | -h)
1920 --help | -h)
1921 long_usage=yes
1921 long_usage=yes
1922 dev_tools_ee_usage
1922 dev_tools_ee_usage
1923 exit
1923 exit
1924 ;;
1924 ;;
1925
1925
1926 *)
1926 *)
1927 break
1927 break
1928 ;;
1928 ;;
1929
1929
1930 esac
1930 esac
1931 done
1931 done
1932
1932
1933 # :command.command_filter
1933 # :command.command_filter
1934 action="ee"
1934 action="ee"
1935
1935
1936 # :command.parse_requirements_while
1936 # :command.parse_requirements_while
1937 while [[ $# -gt 0 ]]; do
1937 while [[ $# -gt 0 ]]; do
1938 key="$1"
1938 key="$1"
1939 case "$key" in
1939 case "$key" in
1940
1940
1941 -?*)
1941 -?*)
1942 printf "invalid option: %s\n" "$key" >&2
1942 printf "invalid option: %s\n" "$key" >&2
1943 exit 1
1943 exit 1
1944 ;;
1944 ;;
1945
1945
1946 *)
1946 *)
1947 # :command.parse_requirements_case
1947 # :command.parse_requirements_case
1948 # :command.parse_requirements_case_simple
1948 # :command.parse_requirements_case_simple
1949 printf "invalid argument: %s\n" "$key" >&2
1949 printf "invalid argument: %s\n" "$key" >&2
1950 exit 1
1950 exit 1
1951
1951
1952 ;;
1952 ;;
1953
1953
1954 esac
1954 esac
1955 done
1955 done
1956
1956
1957 }
1957 }
1958
1958
1959 # :command.parse_requirements
1959 # :command.parse_requirements
1960 dev_tools_ce_parse_requirements() {
1960 dev_tools_ce_parse_requirements() {
1961 # :command.fixed_flags_filter
1961 # :command.fixed_flags_filter
1962 while [[ $# -gt 0 ]]; do
1962 while [[ $# -gt 0 ]]; do
1963 case "${1:-}" in
1963 case "${1:-}" in
1964 --help | -h)
1964 --help | -h)
1965 long_usage=yes
1965 long_usage=yes
1966 dev_tools_ce_usage
1966 dev_tools_ce_usage
1967 exit
1967 exit
1968 ;;
1968 ;;
1969
1969
1970 *)
1970 *)
1971 break
1971 break
1972 ;;
1972 ;;
1973
1973
1974 esac
1974 esac
1975 done
1975 done
1976
1976
1977 # :command.command_filter
1977 # :command.command_filter
1978 action="ce"
1978 action="ce"
1979
1979
1980 # :command.parse_requirements_while
1980 # :command.parse_requirements_while
1981 while [[ $# -gt 0 ]]; do
1981 while [[ $# -gt 0 ]]; do
1982 key="$1"
1982 key="$1"
1983 case "$key" in
1983 case "$key" in
1984
1984
1985 -?*)
1985 -?*)
1986 printf "invalid option: %s\n" "$key" >&2
1986 printf "invalid option: %s\n" "$key" >&2
1987 exit 1
1987 exit 1
1988 ;;
1988 ;;
1989
1989
1990 *)
1990 *)
1991 # :command.parse_requirements_case
1991 # :command.parse_requirements_case
1992 # :command.parse_requirements_case_simple
1992 # :command.parse_requirements_case_simple
1993 printf "invalid argument: %s\n" "$key" >&2
1993 printf "invalid argument: %s\n" "$key" >&2
1994 exit 1
1994 exit 1
1995
1995
1996 ;;
1996 ;;
1997
1997
1998 esac
1998 esac
1999 done
1999 done
2000
2000
2001 }
2001 }
2002
2002
2003 # :command.parse_requirements
2003 # :command.parse_requirements
2004 dev_tools_svn_parse_requirements() {
2004 dev_tools_svn_parse_requirements() {
2005 # :command.fixed_flags_filter
2005 # :command.fixed_flags_filter
2006 while [[ $# -gt 0 ]]; do
2006 while [[ $# -gt 0 ]]; do
2007 case "${1:-}" in
2007 case "${1:-}" in
2008 --help | -h)
2008 --help | -h)
2009 long_usage=yes
2009 long_usage=yes
2010 dev_tools_svn_usage
2010 dev_tools_svn_usage
2011 exit
2011 exit
2012 ;;
2012 ;;
2013
2013
2014 *)
2014 *)
2015 break
2015 break
2016 ;;
2016 ;;
2017
2017
2018 esac
2018 esac
2019 done
2019 done
2020
2020
2021 # :command.command_filter
2021 # :command.command_filter
2022 action="svn"
2022 action="svn"
2023
2023
2024 # :command.parse_requirements_while
2024 # :command.parse_requirements_while
2025 while [[ $# -gt 0 ]]; do
2025 while [[ $# -gt 0 ]]; do
2026 key="$1"
2026 key="$1"
2027 case "$key" in
2027 case "$key" in
2028
2028
2029 -?*)
2029 -?*)
2030 printf "invalid option: %s\n" "$key" >&2
2030 printf "invalid option: %s\n" "$key" >&2
2031 exit 1
2031 exit 1
2032 ;;
2032 ;;
2033
2033
2034 *)
2034 *)
2035 # :command.parse_requirements_case
2035 # :command.parse_requirements_case
2036 # :command.parse_requirements_case_simple
2036 # :command.parse_requirements_case_simple
2037 printf "invalid argument: %s\n" "$key" >&2
2037 printf "invalid argument: %s\n" "$key" >&2
2038 exit 1
2038 exit 1
2039
2039
2040 ;;
2040 ;;
2041
2041
2042 esac
2042 esac
2043 done
2043 done
2044
2044
2045 }
2045 }
2046
2046
2047 # :command.parse_requirements
2047 # :command.parse_requirements
2048 dev_tools_celery_parse_requirements() {
2048 dev_tools_celery_parse_requirements() {
2049 # :command.fixed_flags_filter
2049 # :command.fixed_flags_filter
2050 while [[ $# -gt 0 ]]; do
2050 while [[ $# -gt 0 ]]; do
2051 case "${1:-}" in
2051 case "${1:-}" in
2052 --help | -h)
2052 --help | -h)
2053 long_usage=yes
2053 long_usage=yes
2054 dev_tools_celery_usage
2054 dev_tools_celery_usage
2055 exit
2055 exit
2056 ;;
2056 ;;
2057
2057
2058 *)
2058 *)
2059 break
2059 break
2060 ;;
2060 ;;
2061
2061
2062 esac
2062 esac
2063 done
2063 done
2064
2064
2065 # :command.command_filter
2065 # :command.command_filter
2066 action="celery"
2066 action="celery"
2067
2067
2068 # :command.parse_requirements_while
2068 # :command.parse_requirements_while
2069 while [[ $# -gt 0 ]]; do
2069 while [[ $# -gt 0 ]]; do
2070 key="$1"
2070 key="$1"
2071 case "$key" in
2071 case "$key" in
2072 # :flag.case
2072 # :flag.case
2073 --workdir)
2073 --workdir)
2074
2074
2075 # :flag.case_arg
2075 # :flag.case_arg
2076 if [[ -n ${2+x} ]]; then
2076 if [[ -n ${2+x} ]]; then
2077
2077
2078 args['--workdir']="$2"
2078 args['--workdir']="$2"
2079 shift
2079 shift
2080 shift
2080 shift
2081 else
2081 else
2082 printf "%s\n" "--workdir requires an argument: --workdir WORKDIR" >&2
2082 printf "%s\n" "--workdir requires an argument: --workdir WORKDIR" >&2
2083 exit 1
2083 exit 1
2084 fi
2084 fi
2085 ;;
2085 ;;
2086
2086
2087 # :flag.case
2087 # :flag.case
2088 --cmd)
2088 --cmd)
2089
2089
2090 # :flag.case_arg
2090 # :flag.case_arg
2091 if [[ -n ${2+x} ]]; then
2091 if [[ -n ${2+x} ]]; then
2092
2092
2093 args['--cmd']="$2"
2093 args['--cmd']="$2"
2094 shift
2094 shift
2095 shift
2095 shift
2096 else
2096 else
2097 printf "%s\n" "--cmd requires an argument: --cmd CMD" >&2
2097 printf "%s\n" "--cmd requires an argument: --cmd CMD" >&2
2098 exit 1
2098 exit 1
2099 fi
2099 fi
2100 ;;
2100 ;;
2101
2101
2102 -?*)
2102 -?*)
2103 printf "invalid option: %s\n" "$key" >&2
2103 printf "invalid option: %s\n" "$key" >&2
2104 exit 1
2104 exit 1
2105 ;;
2105 ;;
2106
2106
2107 *)
2107 *)
2108 # :command.parse_requirements_case
2108 # :command.parse_requirements_case
2109 # :command.parse_requirements_case_simple
2109 # :command.parse_requirements_case_simple
2110 printf "invalid argument: %s\n" "$key" >&2
2110 printf "invalid argument: %s\n" "$key" >&2
2111 exit 1
2111 exit 1
2112
2112
2113 ;;
2113 ;;
2114
2114
2115 esac
2115 esac
2116 done
2116 done
2117
2117
2118 # :command.default_assignments
2118 # :command.default_assignments
2119 [[ -n ${args['--workdir']:-} ]] || args['--workdir']="/home/rhodecode/rhodecode-enterprise-ce"
2119 [[ -n ${args['--workdir']:-} ]] || args['--workdir']="/home/rhodecode/rhodecode-enterprise-ce"
2120 [[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-celery.sh"
2120 [[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-celery.sh"
2121
2121
2122 }
2122 }
2123
2123
2124 # :command.parse_requirements
2124 # :command.parse_requirements
2125 dev_tools_celeryd_parse_requirements() {
2125 dev_tools_celeryd_parse_requirements() {
2126 # :command.fixed_flags_filter
2126 # :command.fixed_flags_filter
2127 while [[ $# -gt 0 ]]; do
2127 while [[ $# -gt 0 ]]; do
2128 case "${1:-}" in
2128 case "${1:-}" in
2129 --help | -h)
2129 --help | -h)
2130 long_usage=yes
2130 long_usage=yes
2131 dev_tools_celeryd_usage
2131 dev_tools_celeryd_usage
2132 exit
2132 exit
2133 ;;
2133 ;;
2134
2134
2135 *)
2135 *)
2136 break
2136 break
2137 ;;
2137 ;;
2138
2138
2139 esac
2139 esac
2140 done
2140 done
2141
2141
2142 # :command.command_filter
2142 # :command.command_filter
2143 action="celeryd"
2143 action="celeryd"
2144
2144
2145 # :command.parse_requirements_while
2145 # :command.parse_requirements_while
2146 while [[ $# -gt 0 ]]; do
2146 while [[ $# -gt 0 ]]; do
2147 key="$1"
2147 key="$1"
2148 case "$key" in
2148 case "$key" in
2149 # :flag.case
2149 # :flag.case
2150 --workdir)
2150 --workdir)
2151
2151
2152 # :flag.case_arg
2152 # :flag.case_arg
2153 if [[ -n ${2+x} ]]; then
2153 if [[ -n ${2+x} ]]; then
2154
2154
2155 args['--workdir']="$2"
2155 args['--workdir']="$2"
2156 shift
2156 shift
2157 shift
2157 shift
2158 else
2158 else
2159 printf "%s\n" "--workdir requires an argument: --workdir WORKDIR" >&2
2159 printf "%s\n" "--workdir requires an argument: --workdir WORKDIR" >&2
2160 exit 1
2160 exit 1
2161 fi
2161 fi
2162 ;;
2162 ;;
2163
2163
2164 # :flag.case
2164 # :flag.case
2165 --cmd)
2165 --cmd)
2166
2166
2167 # :flag.case_arg
2167 # :flag.case_arg
2168 if [[ -n ${2+x} ]]; then
2168 if [[ -n ${2+x} ]]; then
2169
2169
2170 args['--cmd']="$2"
2170 args['--cmd']="$2"
2171 shift
2171 shift
2172 shift
2172 shift
2173 else
2173 else
2174 printf "%s\n" "--cmd requires an argument: --cmd CMD" >&2
2174 printf "%s\n" "--cmd requires an argument: --cmd CMD" >&2
2175 exit 1
2175 exit 1
2176 fi
2176 fi
2177 ;;
2177 ;;
2178
2178
2179 -?*)
2179 -?*)
2180 printf "invalid option: %s\n" "$key" >&2
2180 printf "invalid option: %s\n" "$key" >&2
2181 exit 1
2181 exit 1
2182 ;;
2182 ;;
2183
2183
2184 *)
2184 *)
2185 # :command.parse_requirements_case
2185 # :command.parse_requirements_case
2186 # :command.parse_requirements_case_simple
2186 # :command.parse_requirements_case_simple
2187 printf "invalid argument: %s\n" "$key" >&2
2187 printf "invalid argument: %s\n" "$key" >&2
2188 exit 1
2188 exit 1
2189
2189
2190 ;;
2190 ;;
2191
2191
2192 esac
2192 esac
2193 done
2193 done
2194
2194
2195 # :command.default_assignments
2195 # :command.default_assignments
2196 [[ -n ${args['--workdir']:-} ]] || args['--workdir']="/home/rhodecode/rhodecode-enterprise-ce"
2196 [[ -n ${args['--workdir']:-} ]] || args['--workdir']="/home/rhodecode/rhodecode-enterprise-ce"
2197 [[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-celeryd.sh"
2197 [[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-celeryd.sh"
2198
2198
2199 }
2199 }
2200
2200
2201 # :command.parse_requirements
2201 # :command.parse_requirements
2202 dev_tools_ssh_parse_requirements() {
2202 dev_tools_ssh_parse_requirements() {
2203 # :command.fixed_flags_filter
2203 # :command.fixed_flags_filter
2204 while [[ $# -gt 0 ]]; do
2204 while [[ $# -gt 0 ]]; do
2205 case "${1:-}" in
2205 case "${1:-}" in
2206 --help | -h)
2206 --help | -h)
2207 long_usage=yes
2207 long_usage=yes
2208 dev_tools_ssh_usage
2208 dev_tools_ssh_usage
2209 exit
2209 exit
2210 ;;
2210 ;;
2211
2211
2212 *)
2212 *)
2213 break
2213 break
2214 ;;
2214 ;;
2215
2215
2216 esac
2216 esac
2217 done
2217 done
2218
2218
2219 # :command.command_filter
2219 # :command.command_filter
2220 action="ssh"
2220 action="ssh"
2221
2221
2222 # :command.parse_requirements_while
2222 # :command.parse_requirements_while
2223 while [[ $# -gt 0 ]]; do
2223 while [[ $# -gt 0 ]]; do
2224 key="$1"
2224 key="$1"
2225 case "$key" in
2225 case "$key" in
2226 # :flag.case
2226 # :flag.case
2227 --workdir)
2227 --workdir)
2228
2228
2229 # :flag.case_arg
2229 # :flag.case_arg
2230 if [[ -n ${2+x} ]]; then
2230 if [[ -n ${2+x} ]]; then
2231
2231
2232 args['--workdir']="$2"
2232 args['--workdir']="$2"
2233 shift
2233 shift
2234 shift
2234 shift
2235 else
2235 else
2236 printf "%s\n" "--workdir requires an argument: --workdir WORKDIR" >&2
2236 printf "%s\n" "--workdir requires an argument: --workdir WORKDIR" >&2
2237 exit 1
2237 exit 1
2238 fi
2238 fi
2239 ;;
2239 ;;
2240
2240
2241 # :flag.case
2241 # :flag.case
2242 --cmd)
2242 --cmd)
2243
2243
2244 # :flag.case_arg
2244 # :flag.case_arg
2245 if [[ -n ${2+x} ]]; then
2245 if [[ -n ${2+x} ]]; then
2246
2246
2247 args['--cmd']="$2"
2247 args['--cmd']="$2"
2248 shift
2248 shift
2249 shift
2249 shift
2250 else
2250 else
2251 printf "%s\n" "--cmd requires an argument: --cmd CMD" >&2
2251 printf "%s\n" "--cmd requires an argument: --cmd CMD" >&2
2252 exit 1
2252 exit 1
2253 fi
2253 fi
2254 ;;
2254 ;;
2255
2255
2256 -?*)
2256 -?*)
2257 printf "invalid option: %s\n" "$key" >&2
2257 printf "invalid option: %s\n" "$key" >&2
2258 exit 1
2258 exit 1
2259 ;;
2259 ;;
2260
2260
2261 *)
2261 *)
2262 # :command.parse_requirements_case
2262 # :command.parse_requirements_case
2263 # :command.parse_requirements_case_simple
2263 # :command.parse_requirements_case_simple
2264 printf "invalid argument: %s\n" "$key" >&2
2264 printf "invalid argument: %s\n" "$key" >&2
2265 exit 1
2265 exit 1
2266
2266
2267 ;;
2267 ;;
2268
2268
2269 esac
2269 esac
2270 done
2270 done
2271
2271
2272 # :command.default_assignments
2272 # :command.default_assignments
2273 [[ -n ${args['--workdir']:-} ]] || args['--workdir']="/home/rhodecode/rhodecode-enterprise-ce"
2273 [[ -n ${args['--workdir']:-} ]] || args['--workdir']="/home/rhodecode/rhodecode-enterprise-ce"
2274 [[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-ssh.sh"
2274 [[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-ssh.sh"
2275
2275
2276 }
2276 }
2277
2277
2278 # :command.parse_requirements
2278 # :command.parse_requirements
2279 dev_tools_sshd_parse_requirements() {
2279 dev_tools_sshd_parse_requirements() {
2280 # :command.fixed_flags_filter
2280 # :command.fixed_flags_filter
2281 while [[ $# -gt 0 ]]; do
2281 while [[ $# -gt 0 ]]; do
2282 case "${1:-}" in
2282 case "${1:-}" in
2283 --help | -h)
2283 --help | -h)
2284 long_usage=yes
2284 long_usage=yes
2285 dev_tools_sshd_usage
2285 dev_tools_sshd_usage
2286 exit
2286 exit
2287 ;;
2287 ;;
2288
2288
2289 *)
2289 *)
2290 break
2290 break
2291 ;;
2291 ;;
2292
2292
2293 esac
2293 esac
2294 done
2294 done
2295
2295
2296 # :command.command_filter
2296 # :command.command_filter
2297 action="sshd"
2297 action="sshd"
2298
2298
2299 # :command.parse_requirements_while
2299 # :command.parse_requirements_while
2300 while [[ $# -gt 0 ]]; do
2300 while [[ $# -gt 0 ]]; do
2301 key="$1"
2301 key="$1"
2302 case "$key" in
2302 case "$key" in
2303 # :flag.case
2303 # :flag.case
2304 --workdir)
2304 --workdir)
2305
2305
2306 # :flag.case_arg
2306 # :flag.case_arg
2307 if [[ -n ${2+x} ]]; then
2307 if [[ -n ${2+x} ]]; then
2308
2308
2309 args['--workdir']="$2"
2309 args['--workdir']="$2"
2310 shift
2310 shift
2311 shift
2311 shift
2312 else
2312 else
2313 printf "%s\n" "--workdir requires an argument: --workdir WORKDIR" >&2
2313 printf "%s\n" "--workdir requires an argument: --workdir WORKDIR" >&2
2314 exit 1
2314 exit 1
2315 fi
2315 fi
2316 ;;
2316 ;;
2317
2317
2318 # :flag.case
2318 # :flag.case
2319 --cmd)
2319 --cmd)
2320
2320
2321 # :flag.case_arg
2321 # :flag.case_arg
2322 if [[ -n ${2+x} ]]; then
2322 if [[ -n ${2+x} ]]; then
2323
2323
2324 args['--cmd']="$2"
2324 args['--cmd']="$2"
2325 shift
2325 shift
2326 shift
2326 shift
2327 else
2327 else
2328 printf "%s\n" "--cmd requires an argument: --cmd CMD" >&2
2328 printf "%s\n" "--cmd requires an argument: --cmd CMD" >&2
2329 exit 1
2329 exit 1
2330 fi
2330 fi
2331 ;;
2331 ;;
2332
2332
2333 -?*)
2333 -?*)
2334 printf "invalid option: %s\n" "$key" >&2
2334 printf "invalid option: %s\n" "$key" >&2
2335 exit 1
2335 exit 1
2336 ;;
2336 ;;
2337
2337
2338 *)
2338 *)
2339 # :command.parse_requirements_case
2339 # :command.parse_requirements_case
2340 # :command.parse_requirements_case_simple
2340 # :command.parse_requirements_case_simple
2341 printf "invalid argument: %s\n" "$key" >&2
2341 printf "invalid argument: %s\n" "$key" >&2
2342 exit 1
2342 exit 1
2343
2343
2344 ;;
2344 ;;
2345
2345
2346 esac
2346 esac
2347 done
2347 done
2348
2348
2349 # :command.default_assignments
2349 # :command.default_assignments
2350 [[ -n ${args['--workdir']:-} ]] || args['--workdir']="/home/rhodecode/rhodecode-enterprise-ce"
2350 [[ -n ${args['--workdir']:-} ]] || args['--workdir']="/home/rhodecode/rhodecode-enterprise-ce"
2351 [[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-sshd.sh"
2351 [[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-sshd.sh"
2352
2352
2353 }
2353 }
2354
2354
2355 # :command.parse_requirements
2355 # :command.parse_requirements
2356 dev_tools_tools_parse_requirements() {
2356 dev_tools_tools_parse_requirements() {
2357 # :command.fixed_flags_filter
2357 # :command.fixed_flags_filter
2358 while [[ $# -gt 0 ]]; do
2358 while [[ $# -gt 0 ]]; do
2359 case "${1:-}" in
2359 case "${1:-}" in
2360 --help | -h)
2360 --help | -h)
2361 long_usage=yes
2361 long_usage=yes
2362 dev_tools_tools_usage
2362 dev_tools_tools_usage
2363 exit
2363 exit
2364 ;;
2364 ;;
2365
2365
2366 *)
2366 *)
2367 break
2367 break
2368 ;;
2368 ;;
2369
2369
2370 esac
2370 esac
2371 done
2371 done
2372
2372
2373 # :command.command_filter
2373 # :command.command_filter
2374 action="tools"
2374 action="tools"
2375
2375
2376 # :command.parse_requirements_while
2376 # :command.parse_requirements_while
2377 while [[ $# -gt 0 ]]; do
2377 while [[ $# -gt 0 ]]; do
2378 key="$1"
2378 key="$1"
2379 case "$key" in
2379 case "$key" in
2380
2380
2381 -?*)
2381 -?*)
2382 printf "invalid option: %s\n" "$key" >&2
2382 printf "invalid option: %s\n" "$key" >&2
2383 exit 1
2383 exit 1
2384 ;;
2384 ;;
2385
2385
2386 *)
2386 *)
2387 # :command.parse_requirements_case
2387 # :command.parse_requirements_case
2388 # :command.parse_requirements_case_simple
2388 # :command.parse_requirements_case_simple
2389 printf "invalid argument: %s\n" "$key" >&2
2389 printf "invalid argument: %s\n" "$key" >&2
2390 exit 1
2390 exit 1
2391
2391
2392 ;;
2392 ;;
2393
2393
2394 esac
2394 esac
2395 done
2395 done
2396
2396
2397 }
2397 }
2398
2398
2399 # :command.parse_requirements
2399 # :command.parse_requirements
2400 dev_tools_dev_env_parse_requirements() {
2400 dev_tools_dev_env_parse_requirements() {
2401 # :command.fixed_flags_filter
2401 # :command.fixed_flags_filter
2402 while [[ $# -gt 0 ]]; do
2402 while [[ $# -gt 0 ]]; do
2403 case "${1:-}" in
2403 case "${1:-}" in
2404 --help | -h)
2404 --help | -h)
2405 long_usage=yes
2405 long_usage=yes
2406 dev_tools_dev_env_usage
2406 dev_tools_dev_env_usage
2407 exit
2407 exit
2408 ;;
2408 ;;
2409
2409
2410 *)
2410 *)
2411 break
2411 break
2412 ;;
2412 ;;
2413
2413
2414 esac
2414 esac
2415 done
2415 done
2416
2416
2417 # :command.command_filter
2417 # :command.command_filter
2418 action="dev-env"
2418 action="dev-env"
2419
2419
2420 # :command.parse_requirements_while
2420 # :command.parse_requirements_while
2421 while [[ $# -gt 0 ]]; do
2421 while [[ $# -gt 0 ]]; do
2422 key="$1"
2422 key="$1"
2423 case "$key" in
2423 case "$key" in
2424
2424
2425 -?*)
2425 -?*)
2426 printf "invalid option: %s\n" "$key" >&2
2426 printf "invalid option: %s\n" "$key" >&2
2427 exit 1
2427 exit 1
2428 ;;
2428 ;;
2429
2429
2430 *)
2430 *)
2431 # :command.parse_requirements_case
2431 # :command.parse_requirements_case
2432 # :command.parse_requirements_case_simple
2432 # :command.parse_requirements_case_simple
2433 printf "invalid argument: %s\n" "$key" >&2
2433 printf "invalid argument: %s\n" "$key" >&2
2434 exit 1
2434 exit 1
2435
2435
2436 ;;
2436 ;;
2437
2437
2438 esac
2438 esac
2439 done
2439 done
2440
2440
2441 }
2441 }
2442
2442
2443 # :command.parse_requirements
2443 # :command.parse_requirements
2444 dev_tools_prune_parse_requirements() {
2444 dev_tools_prune_parse_requirements() {
2445 # :command.fixed_flags_filter
2445 # :command.fixed_flags_filter
2446 while [[ $# -gt 0 ]]; do
2446 while [[ $# -gt 0 ]]; do
2447 case "${1:-}" in
2447 case "${1:-}" in
2448 --help | -h)
2448 --help | -h)
2449 long_usage=yes
2449 long_usage=yes
2450 dev_tools_prune_usage
2450 dev_tools_prune_usage
2451 exit
2451 exit
2452 ;;
2452 ;;
2453
2453
2454 *)
2454 *)
2455 break
2455 break
2456 ;;
2456 ;;
2457
2457
2458 esac
2458 esac
2459 done
2459 done
2460
2460
2461 # :command.command_filter
2461 # :command.command_filter
2462 action="prune"
2462 action="prune"
2463
2463
2464 # :command.parse_requirements_while
2464 # :command.parse_requirements_while
2465 while [[ $# -gt 0 ]]; do
2465 while [[ $# -gt 0 ]]; do
2466 key="$1"
2466 key="$1"
2467 case "$key" in
2467 case "$key" in
2468
2468
2469 -?*)
2469 -?*)
2470 printf "invalid option: %s\n" "$key" >&2
2470 printf "invalid option: %s\n" "$key" >&2
2471 exit 1
2471 exit 1
2472 ;;
2472 ;;
2473
2473
2474 *)
2474 *)
2475 # :command.parse_requirements_case
2475 # :command.parse_requirements_case
2476 # :command.parse_requirements_case_simple
2476 # :command.parse_requirements_case_simple
2477 printf "invalid argument: %s\n" "$key" >&2
2477 printf "invalid argument: %s\n" "$key" >&2
2478 exit 1
2478 exit 1
2479
2479
2480 ;;
2480 ;;
2481
2481
2482 esac
2482 esac
2483 done
2483 done
2484
2484
2485 }
2485 }
2486
2486
2487 # :command.parse_requirements
2487 # :command.parse_requirements
2488 dev_tools_prune_all_parse_requirements() {
2488 dev_tools_prune_all_parse_requirements() {
2489 # :command.fixed_flags_filter
2489 # :command.fixed_flags_filter
2490 while [[ $# -gt 0 ]]; do
2490 while [[ $# -gt 0 ]]; do
2491 case "${1:-}" in
2491 case "${1:-}" in
2492 --help | -h)
2492 --help | -h)
2493 long_usage=yes
2493 long_usage=yes
2494 dev_tools_prune_all_usage
2494 dev_tools_prune_all_usage
2495 exit
2495 exit
2496 ;;
2496 ;;
2497
2497
2498 *)
2498 *)
2499 break
2499 break
2500 ;;
2500 ;;
2501
2501
2502 esac
2502 esac
2503 done
2503 done
2504
2504
2505 # :command.command_filter
2505 # :command.command_filter
2506 action="prune-all"
2506 action="prune-all"
2507
2507
2508 # :command.parse_requirements_while
2508 # :command.parse_requirements_while
2509 while [[ $# -gt 0 ]]; do
2509 while [[ $# -gt 0 ]]; do
2510 key="$1"
2510 key="$1"
2511 case "$key" in
2511 case "$key" in
2512
2512
2513 -?*)
2513 -?*)
2514 printf "invalid option: %s\n" "$key" >&2
2514 printf "invalid option: %s\n" "$key" >&2
2515 exit 1
2515 exit 1
2516 ;;
2516 ;;
2517
2517
2518 *)
2518 *)
2519 # :command.parse_requirements_case
2519 # :command.parse_requirements_case
2520 # :command.parse_requirements_case_simple
2520 # :command.parse_requirements_case_simple
2521 printf "invalid argument: %s\n" "$key" >&2
2521 printf "invalid argument: %s\n" "$key" >&2
2522 exit 1
2522 exit 1
2523
2523
2524 ;;
2524 ;;
2525
2525
2526 esac
2526 esac
2527 done
2527 done
2528
2528
2529 }
2529 }
2530
2530
2531 # :command.parse_requirements
2531 # :command.parse_requirements
2532 dev_tools_cli_generate_pull_parse_requirements() {
2532 dev_tools_cli_generate_pull_parse_requirements() {
2533 # :command.fixed_flags_filter
2533 # :command.fixed_flags_filter
2534 while [[ $# -gt 0 ]]; do
2534 while [[ $# -gt 0 ]]; do
2535 case "${1:-}" in
2535 case "${1:-}" in
2536 --help | -h)
2536 --help | -h)
2537 long_usage=yes
2537 long_usage=yes
2538 dev_tools_cli_generate_pull_usage
2538 dev_tools_cli_generate_pull_usage
2539 exit
2539 exit
2540 ;;
2540 ;;
2541
2541
2542 *)
2542 *)
2543 break
2543 break
2544 ;;
2544 ;;
2545
2545
2546 esac
2546 esac
2547 done
2547 done
2548
2548
2549 # :command.command_filter
2549 # :command.command_filter
2550 action="cli-generate-pull"
2550 action="cli-generate-pull"
2551
2551
2552 # :command.parse_requirements_while
2552 # :command.parse_requirements_while
2553 while [[ $# -gt 0 ]]; do
2553 while [[ $# -gt 0 ]]; do
2554 key="$1"
2554 key="$1"
2555 case "$key" in
2555 case "$key" in
2556
2556
2557 -?*)
2557 -?*)
2558 printf "invalid option: %s\n" "$key" >&2
2558 printf "invalid option: %s\n" "$key" >&2
2559 exit 1
2559 exit 1
2560 ;;
2560 ;;
2561
2561
2562 *)
2562 *)
2563 # :command.parse_requirements_case
2563 # :command.parse_requirements_case
2564 # :command.parse_requirements_case_simple
2564 # :command.parse_requirements_case_simple
2565 printf "invalid argument: %s\n" "$key" >&2
2565 printf "invalid argument: %s\n" "$key" >&2
2566 exit 1
2566 exit 1
2567
2567
2568 ;;
2568 ;;
2569
2569
2570 esac
2570 esac
2571 done
2571 done
2572
2572
2573 }
2573 }
2574
2574
2575 # :command.parse_requirements
2575 # :command.parse_requirements
2576 dev_tools_cli_generate_help_parse_requirements() {
2576 dev_tools_cli_generate_help_parse_requirements() {
2577 # :command.fixed_flags_filter
2577 # :command.fixed_flags_filter
2578 while [[ $# -gt 0 ]]; do
2578 while [[ $# -gt 0 ]]; do
2579 case "${1:-}" in
2579 case "${1:-}" in
2580 --help | -h)
2580 --help | -h)
2581 long_usage=yes
2581 long_usage=yes
2582 dev_tools_cli_generate_help_usage
2582 dev_tools_cli_generate_help_usage
2583 exit
2583 exit
2584 ;;
2584 ;;
2585
2585
2586 *)
2586 *)
2587 break
2587 break
2588 ;;
2588 ;;
2589
2589
2590 esac
2590 esac
2591 done
2591 done
2592
2592
2593 # :command.command_filter
2593 # :command.command_filter
2594 action="cli-generate-help"
2594 action="cli-generate-help"
2595
2595
2596 # :command.parse_requirements_while
2596 # :command.parse_requirements_while
2597 while [[ $# -gt 0 ]]; do
2597 while [[ $# -gt 0 ]]; do
2598 key="$1"
2598 key="$1"
2599 case "$key" in
2599 case "$key" in
2600
2600
2601 -?*)
2601 -?*)
2602 printf "invalid option: %s\n" "$key" >&2
2602 printf "invalid option: %s\n" "$key" >&2
2603 exit 1
2603 exit 1
2604 ;;
2604 ;;
2605
2605
2606 *)
2606 *)
2607 # :command.parse_requirements_case
2607 # :command.parse_requirements_case
2608 # :command.parse_requirements_case_simple
2608 # :command.parse_requirements_case_simple
2609 printf "invalid argument: %s\n" "$key" >&2
2609 printf "invalid argument: %s\n" "$key" >&2
2610 exit 1
2610 exit 1
2611
2611
2612 ;;
2612 ;;
2613
2613
2614 esac
2614 esac
2615 done
2615 done
2616
2616
2617 }
2617 }
2618
2618
2619 # :command.parse_requirements
2619 # :command.parse_requirements
2620 dev_tools_stack_cli_version_parse_requirements() {
2620 dev_tools_stack_cli_version_parse_requirements() {
2621 # :command.fixed_flags_filter
2621 # :command.fixed_flags_filter
2622 while [[ $# -gt 0 ]]; do
2622 while [[ $# -gt 0 ]]; do
2623 case "${1:-}" in
2623 case "${1:-}" in
2624 --help | -h)
2624 --help | -h)
2625 long_usage=yes
2625 long_usage=yes
2626 dev_tools_stack_cli_version_usage
2626 dev_tools_stack_cli_version_usage
2627 exit
2627 exit
2628 ;;
2628 ;;
2629
2629
2630 *)
2630 *)
2631 break
2631 break
2632 ;;
2632 ;;
2633
2633
2634 esac
2634 esac
2635 done
2635 done
2636
2636
2637 # :command.command_filter
2637 # :command.command_filter
2638 action="stack-cli-version"
2638 action="stack-cli-version"
2639
2639
2640 # :command.parse_requirements_while
2640 # :command.parse_requirements_while
2641 while [[ $# -gt 0 ]]; do
2641 while [[ $# -gt 0 ]]; do
2642 key="$1"
2642 key="$1"
2643 case "$key" in
2643 case "$key" in
2644
2644
2645 -?*)
2645 -?*)
2646 printf "invalid option: %s\n" "$key" >&2
2646 printf "invalid option: %s\n" "$key" >&2
2647 exit 1
2647 exit 1
2648 ;;
2648 ;;
2649
2649
2650 *)
2650 *)
2651 # :command.parse_requirements_case
2651 # :command.parse_requirements_case
2652 # :command.parse_requirements_case_simple
2652 # :command.parse_requirements_case_simple
2653 if [[ -z ${args['version']+x} ]]; then
2653 if [[ -z ${args['version']+x} ]]; then
2654
2654
2655 args['version']=$1
2655 args['version']=$1
2656 shift
2656 shift
2657 else
2657 else
2658 printf "invalid argument: %s\n" "$key" >&2
2658 printf "invalid argument: %s\n" "$key" >&2
2659 exit 1
2659 exit 1
2660 fi
2660 fi
2661
2661
2662 ;;
2662 ;;
2663
2663
2664 esac
2664 esac
2665 done
2665 done
2666
2666
2667 # :command.required_args_filter
2667 # :command.required_args_filter
2668 if [[ -z ${args['version']+x} ]]; then
2668 if [[ -z ${args['version']+x} ]]; then
2669 printf "missing required argument: VERSION\nusage: dev-tools stack-cli-version VERSION\n" >&2
2669 printf "missing required argument: VERSION\nusage: dev-tools stack-cli-version VERSION\n" >&2
2670 exit 1
2670 exit 1
2671 fi
2671 fi
2672
2672
2673 }
2673 }
2674
2674
2675 # :command.parse_requirements
2675 # :command.parse_requirements
2676 dev_tools_cli_generate_rc_parse_requirements() {
2676 dev_tools_cli_generate_rc_parse_requirements() {
2677 # :command.fixed_flags_filter
2677 # :command.fixed_flags_filter
2678 while [[ $# -gt 0 ]]; do
2678 while [[ $# -gt 0 ]]; do
2679 case "${1:-}" in
2679 case "${1:-}" in
2680 --help | -h)
2680 --help | -h)
2681 long_usage=yes
2681 long_usage=yes
2682 dev_tools_cli_generate_rc_usage
2682 dev_tools_cli_generate_rc_usage
2683 exit
2683 exit
2684 ;;
2684 ;;
2685
2685
2686 *)
2686 *)
2687 break
2687 break
2688 ;;
2688 ;;
2689
2689
2690 esac
2690 esac
2691 done
2691 done
2692
2692
2693 # :command.command_filter
2693 # :command.command_filter
2694 action="cli-generate-rc"
2694 action="cli-generate-rc"
2695
2695
2696 # :command.parse_requirements_while
2696 # :command.parse_requirements_while
2697 while [[ $# -gt 0 ]]; do
2697 while [[ $# -gt 0 ]]; do
2698 key="$1"
2698 key="$1"
2699 case "$key" in
2699 case "$key" in
2700 # :flag.case
2700 # :flag.case
2701 --one-time | -o)
2701 --one-time | -o)
2702
2702
2703 # :flag.case_no_arg
2703 # :flag.case_no_arg
2704 args['--one-time']=1
2704 args['--one-time']=1
2705 shift
2705 shift
2706 ;;
2706 ;;
2707
2707
2708 -?*)
2708 -?*)
2709 printf "invalid option: %s\n" "$key" >&2
2709 printf "invalid option: %s\n" "$key" >&2
2710 exit 1
2710 exit 1
2711 ;;
2711 ;;
2712
2712
2713 *)
2713 *)
2714 # :command.parse_requirements_case
2714 # :command.parse_requirements_case
2715 # :command.parse_requirements_case_simple
2715 # :command.parse_requirements_case_simple
2716 printf "invalid argument: %s\n" "$key" >&2
2716 printf "invalid argument: %s\n" "$key" >&2
2717 exit 1
2717 exit 1
2718
2718
2719 ;;
2719 ;;
2720
2720
2721 esac
2721 esac
2722 done
2722 done
2723
2723
2724 }
2724 }
2725
2725
2726 # :command.parse_requirements
2726 # :command.parse_requirements
2727 dev_tools_cli_generate_dev_parse_requirements() {
2727 dev_tools_cli_generate_dev_parse_requirements() {
2728 # :command.fixed_flags_filter
2728 # :command.fixed_flags_filter
2729 while [[ $# -gt 0 ]]; do
2729 while [[ $# -gt 0 ]]; do
2730 case "${1:-}" in
2730 case "${1:-}" in
2731 --help | -h)
2731 --help | -h)
2732 long_usage=yes
2732 long_usage=yes
2733 dev_tools_cli_generate_dev_usage
2733 dev_tools_cli_generate_dev_usage
2734 exit
2734 exit
2735 ;;
2735 ;;
2736
2736
2737 *)
2737 *)
2738 break
2738 break
2739 ;;
2739 ;;
2740
2740
2741 esac
2741 esac
2742 done
2742 done
2743
2743
2744 # :command.command_filter
2744 # :command.command_filter
2745 action="cli-generate-dev"
2745 action="cli-generate-dev"
2746
2746
2747 # :command.parse_requirements_while
2747 # :command.parse_requirements_while
2748 while [[ $# -gt 0 ]]; do
2748 while [[ $# -gt 0 ]]; do
2749 key="$1"
2749 key="$1"
2750 case "$key" in
2750 case "$key" in
2751 # :flag.case
2751 # :flag.case
2752 --one-time | -o)
2752 --one-time | -o)
2753
2753
2754 # :flag.case_no_arg
2754 # :flag.case_no_arg
2755 args['--one-time']=1
2755 args['--one-time']=1
2756 shift
2756 shift
2757 ;;
2757 ;;
2758
2758
2759 -?*)
2759 -?*)
2760 printf "invalid option: %s\n" "$key" >&2
2760 printf "invalid option: %s\n" "$key" >&2
2761 exit 1
2761 exit 1
2762 ;;
2762 ;;
2763
2763
2764 *)
2764 *)
2765 # :command.parse_requirements_case
2765 # :command.parse_requirements_case
2766 # :command.parse_requirements_case_simple
2766 # :command.parse_requirements_case_simple
2767 printf "invalid argument: %s\n" "$key" >&2
2767 printf "invalid argument: %s\n" "$key" >&2
2768 exit 1
2768 exit 1
2769
2769
2770 ;;
2770 ;;
2771
2771
2772 esac
2772 esac
2773 done
2773 done
2774
2774
2775 }
2775 }
2776
2776
2777 # :command.parse_requirements
2777 # :command.parse_requirements
2778 dev_tools_get_build_artifacts_parse_requirements() {
2778 dev_tools_get_build_artifacts_parse_requirements() {
2779 # :command.fixed_flags_filter
2779 # :command.fixed_flags_filter
2780 while [[ $# -gt 0 ]]; do
2780 while [[ $# -gt 0 ]]; do
2781 case "${1:-}" in
2781 case "${1:-}" in
2782 --help | -h)
2782 --help | -h)
2783 long_usage=yes
2783 long_usage=yes
2784 dev_tools_get_build_artifacts_usage
2784 dev_tools_get_build_artifacts_usage
2785 exit
2785 exit
2786 ;;
2786 ;;
2787
2787
2788 *)
2788 *)
2789 break
2789 break
2790 ;;
2790 ;;
2791
2791
2792 esac
2792 esac
2793 done
2793 done
2794
2794
2795 # :command.command_filter
2795 # :command.command_filter
2796 action="get-build-artifacts"
2796 action="get-build-artifacts"
2797
2797
2798 # :command.parse_requirements_while
2798 # :command.parse_requirements_while
2799 while [[ $# -gt 0 ]]; do
2799 while [[ $# -gt 0 ]]; do
2800 key="$1"
2800 key="$1"
2801 case "$key" in
2801 case "$key" in
2802 # :flag.case
2802 # :flag.case
2803 --auth)
2803 --auth)
2804
2804
2805 # :flag.case_arg
2805 # :flag.case_arg
2806 if [[ -n ${2+x} ]]; then
2806 if [[ -n ${2+x} ]]; then
2807
2807
2808 args['--auth']="$2"
2808 args['--auth']="$2"
2809 shift
2809 shift
2810 shift
2810 shift
2811 else
2811 else
2812 printf "%s\n" "--auth requires an argument: --auth AUTH" >&2
2812 printf "%s\n" "--auth requires an argument: --auth AUTH" >&2
2813 exit 1
2813 exit 1
2814 fi
2814 fi
2815 ;;
2815 ;;
2816
2816
2817 # :flag.case
2817 # :flag.case
2818 --installer-url)
2818 --installer-url)
2819
2819
2820 # :flag.case_arg
2820 # :flag.case_arg
2821 if [[ -n ${2+x} ]]; then
2821 if [[ -n ${2+x} ]]; then
2822
2822
2823 args['--installer-url']="$2"
2823 args['--installer-url']="$2"
2824 shift
2824 shift
2825 shift
2825 shift
2826 else
2826 else
2827 printf "%s\n" "--installer-url requires an argument: --installer-url INSTALLER_URL" >&2
2827 printf "%s\n" "--installer-url requires an argument: --installer-url INSTALLER_URL" >&2
2828 exit 1
2828 exit 1
2829 fi
2829 fi
2830 ;;
2830 ;;
2831
2831
2832 # :flag.case
2832 # :flag.case
2833 --manifest-url)
2833 --manifest-url)
2834
2834
2835 # :flag.case_arg
2835 # :flag.case_arg
2836 if [[ -n ${2+x} ]]; then
2836 if [[ -n ${2+x} ]]; then
2837
2837
2838 args['--manifest-url']="$2"
2838 args['--manifest-url']="$2"
2839 shift
2839 shift
2840 shift
2840 shift
2841 else
2841 else
2842 printf "%s\n" "--manifest-url requires an argument: --manifest-url MANIFEST_URL" >&2
2842 printf "%s\n" "--manifest-url requires an argument: --manifest-url MANIFEST_URL" >&2
2843 exit 1
2843 exit 1
2844 fi
2844 fi
2845 ;;
2845 ;;
2846
2846
2847 # :flag.case
2847 # :flag.case
2848 --version-name)
2848 --version-name)
2849
2849
2850 # :flag.case_arg
2850 # :flag.case_arg
2851 if [[ -n ${2+x} ]]; then
2851 if [[ -n ${2+x} ]]; then
2852
2852
2853 args['--version-name']="$2"
2853 args['--version-name']="$2"
2854 shift
2854 shift
2855 shift
2855 shift
2856 else
2856 else
2857 printf "%s\n" "--version-name requires an argument: --version-name VERSION_NAME" >&2
2857 printf "%s\n" "--version-name requires an argument: --version-name VERSION_NAME" >&2
2858 exit 1
2858 exit 1
2859 fi
2859 fi
2860 ;;
2860 ;;
2861
2861
2862 -?*)
2862 -?*)
2863 printf "invalid option: %s\n" "$key" >&2
2863 printf "invalid option: %s\n" "$key" >&2
2864 exit 1
2864 exit 1
2865 ;;
2865 ;;
2866
2866
2867 *)
2867 *)
2868 # :command.parse_requirements_case
2868 # :command.parse_requirements_case
2869 # :command.parse_requirements_case_simple
2869 # :command.parse_requirements_case_simple
2870 printf "invalid argument: %s\n" "$key" >&2
2870 printf "invalid argument: %s\n" "$key" >&2
2871 exit 1
2871 exit 1
2872
2872
2873 ;;
2873 ;;
2874
2874
2875 esac
2875 esac
2876 done
2876 done
2877
2877
2878 # :command.default_assignments
2878 # :command.default_assignments
2879 [[ -n ${args['--auth']:-} ]] || args['--auth']=""
2879 [[ -n ${args['--auth']:-} ]] || args['--auth']=""
2880 [[ -n ${args['--installer-url']:-} ]] || args['--installer-url']="https://dls.rhodecode.com/dls/N2E2ZTY1NzA3NjYxNDA2NTc1NjI3MTcyNzA2MjcxNzIyZTcwNjI3YQ==/rhodecode-control/latest-linux-ee"
2880 [[ -n ${args['--installer-url']:-} ]] || args['--installer-url']="https://dls.rhodecode.com/dls/N2E2ZTY1NzA3NjYxNDA2NTc1NjI3MTcyNzA2MjcxNzIyZTcwNjI3YQ==/rhodecode-control/latest-linux-ee"
2881 [[ -n ${args['--manifest-url']:-} ]] || args['--manifest-url']="https://dls.rhodecode.com/linux/MANIFEST"
2881 [[ -n ${args['--manifest-url']:-} ]] || args['--manifest-url']="https://dls.rhodecode.com/linux/MANIFEST"
2882 [[ -n ${args['--version-name']:-} ]] || args['--version-name']="$RC_CLI_VERSION_NAME"
2882 [[ -n ${args['--version-name']:-} ]] || args['--version-name']="$RC_CLI_VERSION_NAME"
2883
2883
2884 }
2884 }
2885
2885
2886 # :command.parse_requirements
2886 # :command.parse_requirements
2887 dev_tools_build_installer_parse_requirements() {
2887 dev_tools_build_installer_parse_requirements() {
2888 # :command.fixed_flags_filter
2888 # :command.fixed_flags_filter
2889 while [[ $# -gt 0 ]]; do
2889 while [[ $# -gt 0 ]]; do
2890 case "${1:-}" in
2890 case "${1:-}" in
2891 --help | -h)
2891 --help | -h)
2892 long_usage=yes
2892 long_usage=yes
2893 dev_tools_build_installer_usage
2893 dev_tools_build_installer_usage
2894 exit
2894 exit
2895 ;;
2895 ;;
2896
2896
2897 *)
2897 *)
2898 break
2898 break
2899 ;;
2899 ;;
2900
2900
2901 esac
2901 esac
2902 done
2902 done
2903
2903
2904 # :command.command_filter
2904 # :command.command_filter
2905 action="build-installer"
2905 action="build-installer"
2906
2906
2907 # :command.parse_requirements_while
2907 # :command.parse_requirements_while
2908 while [[ $# -gt 0 ]]; do
2908 while [[ $# -gt 0 ]]; do
2909 key="$1"
2909 key="$1"
2910 case "$key" in
2910 case "$key" in
2911 # :flag.case
2911 # :flag.case
2912 --version-name)
2912 --version-name)
2913
2913
2914 # :flag.case_arg
2914 # :flag.case_arg
2915 if [[ -n ${2+x} ]]; then
2915 if [[ -n ${2+x} ]]; then
2916
2916
2917 args['--version-name']="$2"
2917 args['--version-name']="$2"
2918 shift
2918 shift
2919 shift
2919 shift
2920 else
2920 else
2921 printf "%s\n" "--version-name requires an argument: --version-name VERSION_NAME" >&2
2921 printf "%s\n" "--version-name requires an argument: --version-name VERSION_NAME" >&2
2922 exit 1
2922 exit 1
2923 fi
2923 fi
2924 ;;
2924 ;;
2925
2925
2926 -?*)
2926 -?*)
2927 printf "invalid option: %s\n" "$key" >&2
2927 printf "invalid option: %s\n" "$key" >&2
2928 exit 1
2928 exit 1
2929 ;;
2929 ;;
2930
2930
2931 *)
2931 *)
2932 # :command.parse_requirements_case
2932 # :command.parse_requirements_case
2933 # :command.parse_requirements_case_simple
2933 # :command.parse_requirements_case_simple
2934 printf "invalid argument: %s\n" "$key" >&2
2934 printf "invalid argument: %s\n" "$key" >&2
2935 exit 1
2935 exit 1
2936
2936
2937 ;;
2937 ;;
2938
2938
2939 esac
2939 esac
2940 done
2940 done
2941
2941
2942 # :command.default_assignments
2942 # :command.default_assignments
2943 [[ -n ${args['--version-name']:-} ]] || args['--version-name']="$RC_CLI_VERSION_NAME"
2943 [[ -n ${args['--version-name']:-} ]] || args['--version-name']="$RC_CLI_VERSION_NAME"
2944
2944
2945 }
2945 }
2946
2946
2947 # :command.parse_requirements
2947 # :command.parse_requirements
2948 dev_tools_get_build_source_parse_requirements() {
2948 dev_tools_get_build_source_parse_requirements() {
2949 # :command.fixed_flags_filter
2949 # :command.fixed_flags_filter
2950 while [[ $# -gt 0 ]]; do
2950 while [[ $# -gt 0 ]]; do
2951 case "${1:-}" in
2951 case "${1:-}" in
2952 --help | -h)
2952 --help | -h)
2953 long_usage=yes
2953 long_usage=yes
2954 dev_tools_get_build_source_usage
2954 dev_tools_get_build_source_usage
2955 exit
2955 exit
2956 ;;
2956 ;;
2957
2957
2958 *)
2958 *)
2959 break
2959 break
2960 ;;
2960 ;;
2961
2961
2962 esac
2962 esac
2963 done
2963 done
2964
2964
2965 # :command.dependencies_filter
2965 # :command.dependencies_filter
2966 if command -v curl >/dev/null 2>&1; then
2966 if command -v curl >/dev/null 2>&1; then
2967 deps['curl']="$(command -v curl | head -n1)"
2967 deps['curl']="$(command -v curl | head -n1)"
2968 else
2968 else
2969 printf "missing dependency: curl\n" >&2
2969 printf "missing dependency: curl\n" >&2
2970 exit 1
2970 exit 1
2971 fi
2971 fi
2972
2972
2973 if command -v tar >/dev/null 2>&1; then
2973 if command -v tar >/dev/null 2>&1; then
2974 deps['tar']="$(command -v tar | head -n1)"
2974 deps['tar']="$(command -v tar | head -n1)"
2975 else
2975 else
2976 printf "missing dependency: tar\n" >&2
2976 printf "missing dependency: tar\n" >&2
2977 exit 1
2977 exit 1
2978 fi
2978 fi
2979
2979
2980 # :command.command_filter
2980 # :command.command_filter
2981 action="get-build-source"
2981 action="get-build-source"
2982
2982
2983 # :command.parse_requirements_while
2983 # :command.parse_requirements_while
2984 while [[ $# -gt 0 ]]; do
2984 while [[ $# -gt 0 ]]; do
2985 key="$1"
2985 key="$1"
2986 case "$key" in
2986 case "$key" in
2987 # :flag.case
2987 # :flag.case
2988 --revision)
2988 --revision)
2989
2989
2990 # :flag.case_arg
2990 # :flag.case_arg
2991 if [[ -n ${2+x} ]]; then
2991 if [[ -n ${2+x} ]]; then
2992
2992
2993 args['--revision']="$2"
2993 args['--revision']="$2"
2994 shift
2994 shift
2995 shift
2995 shift
2996 else
2996 else
2997 printf "%s\n" "--revision requires an argument: --revision REVISION" >&2
2997 printf "%s\n" "--revision requires an argument: --revision REVISION" >&2
2998 exit 1
2998 exit 1
2999 fi
2999 fi
3000 ;;
3000 ;;
3001
3001
3002 # :flag.case
3002 # :flag.case
3003 --auth-token)
3003 --auth-token)
3004
3004
3005 # :flag.case_arg
3005 # :flag.case_arg
3006 if [[ -n ${2+x} ]]; then
3006 if [[ -n ${2+x} ]]; then
3007
3007
3008 args['--auth-token']="$2"
3008 args['--auth-token']="$2"
3009 shift
3009 shift
3010 shift
3010 shift
3011 else
3011 else
3012 printf "%s\n" "--auth-token requires an argument: --auth-token AUTH_TOKEN" >&2
3012 printf "%s\n" "--auth-token requires an argument: --auth-token AUTH_TOKEN" >&2
3013 exit 1
3013 exit 1
3014 fi
3014 fi
3015 ;;
3015 ;;
3016
3016
3017 # :flag.case
3017 # :flag.case
3018 --server-url)
3018 --server-url)
3019
3019
3020 # :flag.case_arg
3020 # :flag.case_arg
3021 if [[ -n ${2+x} ]]; then
3021 if [[ -n ${2+x} ]]; then
3022
3022
3023 args['--server-url']="$2"
3023 args['--server-url']="$2"
3024 shift
3024 shift
3025 shift
3025 shift
3026 else
3026 else
3027 printf "%s\n" "--server-url requires an argument: --server-url SERVER_URL" >&2
3027 printf "%s\n" "--server-url requires an argument: --server-url SERVER_URL" >&2
3028 exit 1
3028 exit 1
3029 fi
3029 fi
3030 ;;
3030 ;;
3031
3031
3032 -?*)
3032 -?*)
3033 printf "invalid option: %s\n" "$key" >&2
3033 printf "invalid option: %s\n" "$key" >&2
3034 exit 1
3034 exit 1
3035 ;;
3035 ;;
3036
3036
3037 *)
3037 *)
3038 # :command.parse_requirements_case
3038 # :command.parse_requirements_case
3039 # :command.parse_requirements_case_simple
3039 # :command.parse_requirements_case_simple
3040 printf "invalid argument: %s\n" "$key" >&2
3040 printf "invalid argument: %s\n" "$key" >&2
3041 exit 1
3041 exit 1
3042
3042
3043 ;;
3043 ;;
3044
3044
3045 esac
3045 esac
3046 done
3046 done
3047
3047
3048 # :command.default_assignments
3048 # :command.default_assignments
3049 [[ -n ${args['--revision']:-} ]] || args['--revision']="default"
3049 [[ -n ${args['--revision']:-} ]] || args['--revision']="default"
3050 [[ -n ${args['--server-url']:-} ]] || args['--server-url']="https://code.rhodecode.com"
3050 [[ -n ${args['--server-url']:-} ]] || args['--server-url']="https://code.rhodecode.com"
3051
3051
3052 }
3052 }
3053
3053
3054 # :command.parse_requirements
3054 # :command.parse_requirements
3055 dev_tools_build_source_parse_requirements() {
3055 dev_tools_build_source_parse_requirements() {
3056 # :command.fixed_flags_filter
3056 # :command.fixed_flags_filter
3057 while [[ $# -gt 0 ]]; do
3057 while [[ $# -gt 0 ]]; do
3058 case "${1:-}" in
3058 case "${1:-}" in
3059 --help | -h)
3059 --help | -h)
3060 long_usage=yes
3060 long_usage=yes
3061 dev_tools_build_source_usage
3061 dev_tools_build_source_usage
3062 exit
3062 exit
3063 ;;
3063 ;;
3064
3064
3065 *)
3065 *)
3066 break
3066 break
3067 ;;
3067 ;;
3068
3068
3069 esac
3069 esac
3070 done
3070 done
3071
3071
3072 # :command.command_filter
3072 # :command.command_filter
3073 action="build-source"
3073 action="build-source"
3074
3074
3075 # :command.parse_requirements_while
3075 # :command.parse_requirements_while
3076 while [[ $# -gt 0 ]]; do
3076 while [[ $# -gt 0 ]]; do
3077 key="$1"
3077 key="$1"
3078 case "$key" in
3078 case "$key" in
3079 # :flag.case
3079 # :flag.case
3080 --version-name)
3080 --version-name)
3081
3081
3082 # :flag.case_arg
3082 # :flag.case_arg
3083 if [[ -n ${2+x} ]]; then
3083 if [[ -n ${2+x} ]]; then
3084
3084
3085 args['--version-name']="$2"
3085 args['--version-name']="$2"
3086 shift
3086 shift
3087 shift
3087 shift
3088 else
3088 else
3089 printf "%s\n" "--version-name requires an argument: --version-name VERSION_NAME" >&2
3089 printf "%s\n" "--version-name requires an argument: --version-name VERSION_NAME" >&2
3090 exit 1
3090 exit 1
3091 fi
3091 fi
3092 ;;
3092 ;;
3093
3093
3094 # :flag.case
3094 # :flag.case
3095 --source-build-yaml)
3095 --source-build-yaml)
3096
3096
3097 # :flag.case_arg
3097 # :flag.case_arg
3098 if [[ -n ${2+x} ]]; then
3098 if [[ -n ${2+x} ]]; then
3099
3099
3100 args['--source-build-yaml']="$2"
3100 args['--source-build-yaml']="$2"
3101 shift
3101 shift
3102 shift
3102 shift
3103 else
3103 else
3104 printf "%s\n" "--source-build-yaml requires an argument: --source-build-yaml BUILD_SOURCE_YAML" >&2
3104 printf "%s\n" "--source-build-yaml requires an argument: --source-build-yaml BUILD_SOURCE_YAML" >&2
3105 exit 1
3105 exit 1
3106 fi
3106 fi
3107 ;;
3107 ;;
3108
3108
3109 # :flag.case
3109 # :flag.case
3110 --tag)
3110 --tag)
3111
3111
3112 # :flag.case_arg
3112 # :flag.case_arg
3113 if [[ -n ${2+x} ]]; then
3113 if [[ -n ${2+x} ]]; then
3114
3114
3115 if [[ -z ${args['--tag']+x} ]]; then
3115 if [[ -z ${args['--tag']+x} ]]; then
3116 args['--tag']="\"$2\""
3116 args['--tag']="\"$2\""
3117 else
3117 else
3118 args['--tag']="${args[--tag]} \"$2\""
3118 args['--tag']="${args[--tag]} \"$2\""
3119 fi
3119 fi
3120 shift
3120 shift
3121 shift
3121 shift
3122 else
3122 else
3123 printf "%s\n" "--tag requires an argument: --tag TAG" >&2
3123 printf "%s\n" "--tag requires an argument: --tag TAG" >&2
3124 exit 1
3124 exit 1
3125 fi
3125 fi
3126 ;;
3126 ;;
3127
3127
3128 -?*)
3128 -?*)
3129 printf "invalid option: %s\n" "$key" >&2
3129 printf "invalid option: %s\n" "$key" >&2
3130 exit 1
3130 exit 1
3131 ;;
3131 ;;
3132
3132
3133 *)
3133 *)
3134 # :command.parse_requirements_case
3134 # :command.parse_requirements_case
3135 # :command.parse_requirements_case_simple
3135 # :command.parse_requirements_case_simple
3136 printf "invalid argument: %s\n" "$key" >&2
3136 printf "invalid argument: %s\n" "$key" >&2
3137 exit 1
3137 exit 1
3138
3138
3139 ;;
3139 ;;
3140
3140
3141 esac
3141 esac
3142 done
3142 done
3143
3143
3144 # :command.default_assignments
3144 # :command.default_assignments
3145 [[ -n ${args['--version-name']:-} ]] || args['--version-name']="$RC_CLI_VERSION_NAME"
3145 [[ -n ${args['--version-name']:-} ]] || args['--version-name']="$RC_CLI_VERSION_NAME"
3146 [[ -n ${args['--source-build-yaml']:-} ]] || args['--source-build-yaml']="build_yaml/docker-compose-apps.5.yaml"
3146 [[ -n ${args['--source-build-yaml']:-} ]] || args['--source-build-yaml']="build_yaml/docker-compose-apps.5.yaml"
3147
3147
3148 }
3148 }
3149
3149
3150 # :command.initialize
3150 # :command.initialize
3151 initialize() {
3151 initialize() {
3152 version="1.0.0"
3152 version="1.0.0"
3153 long_usage=''
3153 long_usage=''
3154 set -e
3154 set -e
3155
3155
3156 # src/initialize.sh
3156 # src/initialize.sh
3157
3157
3158 bashly_image="dannyben/bashly:1.0.8"
3158 bashly_image="dannyben/bashly:1.0.8"
3159 }
3159 }
3160
3160
3161 # :command.run
3161 # :command.run
3162 run() {
3162 run() {
3163 declare -A args=()
3163 declare -A args=()
3164 declare -A deps=()
3164 declare -A deps=()
3165 declare -a other_args=()
3165 declare -a other_args=()
3166 declare -a input=()
3166 declare -a input=()
3167 normalize_input "$@"
3167 normalize_input "$@"
3168 parse_requirements "${input[@]}"
3168 parse_requirements "${input[@]}"
3169
3169
3170 case "$action" in
3170 case "$action" in
3171 "vcs") dev_tools_vcs_command ;;
3171 "vcs") dev_tools_vcs_command ;;
3172 "ee") dev_tools_ee_command ;;
3172 "ee") dev_tools_ee_command ;;
3173 "ce") dev_tools_ce_command ;;
3173 "ce") dev_tools_ce_command ;;
3174 "svn") dev_tools_svn_command ;;
3174 "svn") dev_tools_svn_command ;;
3175 "celery") dev_tools_celery_command ;;
3175 "celery") dev_tools_celery_command ;;
3176 "celeryd") dev_tools_celeryd_command ;;
3176 "celeryd") dev_tools_celeryd_command ;;
3177 "ssh") dev_tools_ssh_command ;;
3177 "ssh") dev_tools_ssh_command ;;
3178 "sshd") dev_tools_sshd_command ;;
3178 "sshd") dev_tools_sshd_command ;;
3179 "tools") dev_tools_tools_command ;;
3179 "tools") dev_tools_tools_command ;;
3180 "dev-env") dev_tools_dev_env_command ;;
3180 "dev-env") dev_tools_dev_env_command ;;
3181 "prune") dev_tools_prune_command ;;
3181 "prune") dev_tools_prune_command ;;
3182 "prune-all") dev_tools_prune_all_command ;;
3182 "prune-all") dev_tools_prune_all_command ;;
3183 "cli-generate-pull") dev_tools_cli_generate_pull_command ;;
3183 "cli-generate-pull") dev_tools_cli_generate_pull_command ;;
3184 "cli-generate-help") dev_tools_cli_generate_help_command ;;
3184 "cli-generate-help") dev_tools_cli_generate_help_command ;;
3185 "stack-cli-version") dev_tools_stack_cli_version_command ;;
3185 "stack-cli-version") dev_tools_stack_cli_version_command ;;
3186 "cli-generate-rc") dev_tools_cli_generate_rc_command ;;
3186 "cli-generate-rc") dev_tools_cli_generate_rc_command ;;
3187 "cli-generate-dev") dev_tools_cli_generate_dev_command ;;
3187 "cli-generate-dev") dev_tools_cli_generate_dev_command ;;
3188 "get-build-artifacts") dev_tools_get_build_artifacts_command ;;
3188 "get-build-artifacts") dev_tools_get_build_artifacts_command ;;
3189 "build-installer") dev_tools_build_installer_command ;;
3189 "build-installer") dev_tools_build_installer_command ;;
3190 "get-build-source") dev_tools_get_build_source_command ;;
3190 "get-build-source") dev_tools_get_build_source_command ;;
3191 "build-source") dev_tools_build_source_command ;;
3191 "build-source") dev_tools_build_source_command ;;
3192 esac
3192 esac
3193 }
3193 }
3194
3194
3195 initialize
3195 initialize
3196 run "$@"
3196 run "$@"
General Comments 0
You need to be logged in to leave comments. Login now