Show More
@@ -37,11 +37,12 b' dev_tools_usage() {' | |||
|
37 | 37 | printf " %s run bash console for vcsserver\n" "vcs " |
|
38 | 38 | printf " %s run bash console for rhodecode-ee\n" "ee " |
|
39 | 39 | printf " %s run bash console for rhodecode-ce\n" "ce " |
|
40 | printf " %s run bash console for svn web\n" "svn " | |
|
41 | 40 | printf " %s run bash console for rhodecode-celery\n" "celery " |
|
42 | 41 | printf " %s run celery instance on top of mounted source code, e.g ./dev-tools celeryd&\n" "celeryd " |
|
43 | 42 | printf " %s run bash console for rhodecode-ssh\n" "ssh " |
|
44 | 43 | printf " %s run sshd instance for rhodecode-ssh\n" "sshd " |
|
44 | printf " %s run bash console for rhodecode-ssh\n" "svn " | |
|
45 | printf " %s run sshd instance for rhodecode-ssh\n" "svnd " | |
|
45 | 46 | printf " %s run bash console for rhodecode-tools-ce\n" "tools " |
|
46 | 47 | printf " %s create dev env required to run vcsserver and rhodecode\n" "dev-env " |
|
47 | 48 | echo |
@@ -179,29 +180,81 b' dev_tools_ce_usage() {' | |||
|
179 | 180 | } |
|
180 | 181 | |
|
181 | 182 | # :command.usage |
|
182 |
dev_tools_ |
|
|
183 | dev_tools_celery_usage() { | |
|
183 | 184 | if [[ -n $long_usage ]]; then |
|
184 |
printf "dev-tools |
|
|
185 | printf "dev-tools celery - run bash console for rhodecode-celery\n" | |
|
185 | 186 | echo |
|
186 | 187 | |
|
187 | 188 | else |
|
188 |
printf "dev-tools |
|
|
189 | printf "dev-tools celery - run bash console for rhodecode-celery\n" | |
|
189 | 190 | echo |
|
190 | 191 | |
|
191 | 192 | fi |
|
192 | 193 | |
|
193 |
printf " |
|
|
194 | printf "%s\n" "Usage:" | |
|
195 | printf " dev-tools celery [OPTIONS]\n" | |
|
196 | printf " dev-tools celery --help | -h\n" | |
|
194 | 197 | echo |
|
195 | 198 | |
|
199 | # :command.long_usage | |
|
200 | if [[ -n $long_usage ]]; then | |
|
201 | printf "%s\n" "Options:" | |
|
202 | ||
|
203 | # :command.usage_flags | |
|
204 | # :flag.usage | |
|
205 | printf " %s\n" "--workdir WORKDIR" | |
|
206 | printf " workdir to run the pip install -e on top of can be ce or ee only\n" | |
|
207 | printf " Default: /home/rhodecode/rhodecode-enterprise-ce\n" | |
|
208 | echo | |
|
209 | ||
|
210 | # :flag.usage | |
|
211 | printf " %s\n" "--cmd CMD" | |
|
212 | printf " cmd script to run, this is on host machine, relative to $WORKSPACE_HOME\n" | |
|
213 | printf " Default: .dev-env/cmd-celery.sh\n" | |
|
214 | echo | |
|
215 | ||
|
216 | # :command.usage_fixed_flags | |
|
217 | printf " %s\n" "--help, -h" | |
|
218 | printf " Show this help\n" | |
|
219 | echo | |
|
220 | ||
|
221 | fi | |
|
222 | } | |
|
223 | ||
|
224 | # :command.usage | |
|
225 | dev_tools_celeryd_usage() { | |
|
226 | if [[ -n $long_usage ]]; then | |
|
227 | printf "dev-tools celeryd - run celery instance on top of mounted source code, e.g ./dev-tools celeryd&\n" | |
|
228 | echo | |
|
229 | ||
|
230 | else | |
|
231 | printf "dev-tools celeryd - run celery instance on top of mounted source code, e.g ./dev-tools celeryd&\n" | |
|
232 | echo | |
|
233 | ||
|
234 | fi | |
|
235 | ||
|
196 | 236 | printf "%s\n" "Usage:" |
|
197 |
printf " dev-tools |
|
|
198 |
printf " dev-tools |
|
|
237 | printf " dev-tools celeryd [OPTIONS]\n" | |
|
238 | printf " dev-tools celeryd --help | -h\n" | |
|
199 | 239 | echo |
|
200 | 240 | |
|
201 | 241 | # :command.long_usage |
|
202 | 242 | if [[ -n $long_usage ]]; then |
|
203 | 243 | printf "%s\n" "Options:" |
|
204 | 244 | |
|
245 | # :command.usage_flags | |
|
246 | # :flag.usage | |
|
247 | printf " %s\n" "--workdir WORKDIR" | |
|
248 | printf " workdir to run the pip install -e on top of can be ce or ee only\n" | |
|
249 | printf " Default: /home/rhodecode/rhodecode-enterprise-ce\n" | |
|
250 | echo | |
|
251 | ||
|
252 | # :flag.usage | |
|
253 | printf " %s\n" "--cmd CMD" | |
|
254 | printf " cmd script to run, this is on host machine, relative to $WORKSPACE_HOME\n" | |
|
255 | printf " Default: .dev-env/cmd-celeryd.sh\n" | |
|
256 | echo | |
|
257 | ||
|
205 | 258 | # :command.usage_fixed_flags |
|
206 | 259 | printf " %s\n" "--help, -h" |
|
207 | 260 | printf " Show this help\n" |
@@ -211,20 +264,20 b' dev_tools_svn_usage() {' | |||
|
211 | 264 | } |
|
212 | 265 | |
|
213 | 266 | # :command.usage |
|
214 |
dev_tools_ |
|
|
267 | dev_tools_ssh_usage() { | |
|
215 | 268 | if [[ -n $long_usage ]]; then |
|
216 |
printf "dev-tools |
|
|
269 | printf "dev-tools ssh - run bash console for rhodecode-ssh\n" | |
|
217 | 270 | echo |
|
218 | 271 | |
|
219 | 272 | else |
|
220 |
printf "dev-tools |
|
|
273 | printf "dev-tools ssh - run bash console for rhodecode-ssh\n" | |
|
221 | 274 | echo |
|
222 | 275 | |
|
223 | 276 | fi |
|
224 | 277 | |
|
225 | 278 | printf "%s\n" "Usage:" |
|
226 |
printf " dev-tools |
|
|
227 |
printf " dev-tools |
|
|
279 | printf " dev-tools ssh [OPTIONS]\n" | |
|
280 | printf " dev-tools ssh --help | -h\n" | |
|
228 | 281 | echo |
|
229 | 282 | |
|
230 | 283 | # :command.long_usage |
@@ -241,7 +294,7 b' dev_tools_celery_usage() {' | |||
|
241 | 294 | # :flag.usage |
|
242 | 295 | printf " %s\n" "--cmd CMD" |
|
243 | 296 | printf " cmd script to run, this is on host machine, relative to $WORKSPACE_HOME\n" |
|
244 |
printf " Default: .dev-env/cmd- |
|
|
297 | printf " Default: .dev-env/cmd-ssh.sh\n" | |
|
245 | 298 | echo |
|
246 | 299 | |
|
247 | 300 | # :command.usage_fixed_flags |
@@ -253,20 +306,20 b' dev_tools_celery_usage() {' | |||
|
253 | 306 | } |
|
254 | 307 | |
|
255 | 308 | # :command.usage |
|
256 |
dev_tools_ |
|
|
309 | dev_tools_sshd_usage() { | |
|
257 | 310 | 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" | |
|
311 | printf "dev-tools sshd - run sshd instance for rhodecode-ssh\n" | |
|
259 | 312 | echo |
|
260 | 313 | |
|
261 | 314 | else |
|
262 | printf "dev-tools celeryd - run celery instance on top of mounted source code, e.g ./dev-tools celeryd&\n" | |
|
315 | printf "dev-tools sshd - run sshd instance for rhodecode-ssh\n" | |
|
263 | 316 | echo |
|
264 | 317 | |
|
265 | 318 | fi |
|
266 | 319 | |
|
267 | 320 | printf "%s\n" "Usage:" |
|
268 |
printf " dev-tools |
|
|
269 |
printf " dev-tools |
|
|
321 | printf " dev-tools sshd [OPTIONS]\n" | |
|
322 | printf " dev-tools sshd --help | -h\n" | |
|
270 | 323 | echo |
|
271 | 324 | |
|
272 | 325 | # :command.long_usage |
@@ -283,7 +336,7 b' dev_tools_celeryd_usage() {' | |||
|
283 | 336 | # :flag.usage |
|
284 | 337 | printf " %s\n" "--cmd CMD" |
|
285 | 338 | printf " cmd script to run, this is on host machine, relative to $WORKSPACE_HOME\n" |
|
286 |
printf " Default: .dev-env/cmd- |
|
|
339 | printf " Default: .dev-env/cmd-sshd.sh\n" | |
|
287 | 340 | echo |
|
288 | 341 | |
|
289 | 342 | # :command.usage_fixed_flags |
@@ -295,20 +348,20 b' dev_tools_celeryd_usage() {' | |||
|
295 | 348 | } |
|
296 | 349 | |
|
297 | 350 | # :command.usage |
|
298 |
dev_tools_s |
|
|
351 | dev_tools_svn_usage() { | |
|
299 | 352 | if [[ -n $long_usage ]]; then |
|
300 |
printf "dev-tools s |
|
|
353 | printf "dev-tools svn - run bash console for rhodecode-ssh\n" | |
|
301 | 354 | echo |
|
302 | 355 | |
|
303 | 356 | else |
|
304 |
printf "dev-tools s |
|
|
357 | printf "dev-tools svn - run bash console for rhodecode-ssh\n" | |
|
305 | 358 | echo |
|
306 | 359 | |
|
307 | 360 | fi |
|
308 | 361 | |
|
309 | 362 | printf "%s\n" "Usage:" |
|
310 |
printf " dev-tools s |
|
|
311 |
printf " dev-tools s |
|
|
363 | printf " dev-tools svn [OPTIONS]\n" | |
|
364 | printf " dev-tools svn --help | -h\n" | |
|
312 | 365 | echo |
|
313 | 366 | |
|
314 | 367 | # :command.long_usage |
@@ -325,7 +378,7 b' dev_tools_ssh_usage() {' | |||
|
325 | 378 | # :flag.usage |
|
326 | 379 | printf " %s\n" "--cmd CMD" |
|
327 | 380 | printf " cmd script to run, this is on host machine, relative to $WORKSPACE_HOME\n" |
|
328 |
printf " Default: .dev-env/cmd-s |
|
|
381 | printf " Default: .dev-env/cmd-svn.sh\n" | |
|
329 | 382 | echo |
|
330 | 383 | |
|
331 | 384 | # :command.usage_fixed_flags |
@@ -337,20 +390,20 b' dev_tools_ssh_usage() {' | |||
|
337 | 390 | } |
|
338 | 391 | |
|
339 | 392 | # :command.usage |
|
340 |
dev_tools_s |
|
|
393 | dev_tools_svnd_usage() { | |
|
341 | 394 | if [[ -n $long_usage ]]; then |
|
342 |
printf "dev-tools s |
|
|
395 | printf "dev-tools svnd - run sshd instance for rhodecode-ssh\n" | |
|
343 | 396 | echo |
|
344 | 397 | |
|
345 | 398 | else |
|
346 |
printf "dev-tools s |
|
|
399 | printf "dev-tools svnd - run sshd instance for rhodecode-ssh\n" | |
|
347 | 400 | echo |
|
348 | 401 | |
|
349 | 402 | fi |
|
350 | 403 | |
|
351 | 404 | printf "%s\n" "Usage:" |
|
352 |
printf " dev-tools s |
|
|
353 |
printf " dev-tools s |
|
|
405 | printf " dev-tools svnd [OPTIONS]\n" | |
|
406 | printf " dev-tools svnd --help | -h\n" | |
|
354 | 407 | echo |
|
355 | 408 | |
|
356 | 409 | # :command.long_usage |
@@ -367,7 +420,7 b' dev_tools_sshd_usage() {' | |||
|
367 | 420 | # :flag.usage |
|
368 | 421 | printf " %s\n" "--cmd CMD" |
|
369 | 422 | printf " cmd script to run, this is on host machine, relative to $WORKSPACE_HOME\n" |
|
370 |
printf " Default: .dev-env/cmd-s |
|
|
423 | printf " Default: .dev-env/cmd-svnd.sh\n" | |
|
371 | 424 | echo |
|
372 | 425 | |
|
373 | 426 | # :command.usage_fixed_flags |
@@ -1043,35 +1096,6 b' dev_tools_ce_command() {' | |||
|
1043 | 1096 | } |
|
1044 | 1097 | |
|
1045 | 1098 | # :command.function |
|
1046 | dev_tools_svn_command() { | |
|
1047 | # src/svn_command.sh | |
|
1048 | container_name=dev-svn | |
|
1049 | ||
|
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 | |
|
1052 | ||
|
1053 | if [[ -v WORKSPACE_HOME ]]; | |
|
1054 | then | |
|
1055 | DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME | |
|
1056 | else | |
|
1057 | echo "WORKSPACE_HOME env var is not set" | |
|
1058 | exit 1 | |
|
1059 | fi | |
|
1060 | ||
|
1061 | echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME" | |
|
1062 | ||
|
1063 | eval " | |
|
1064 | WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME \ | |
|
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 \ | |
|
1067 | --rm --use-aliases \ | |
|
1068 | --workdir=\"/home/rhodecode\" \ | |
|
1069 | --interactive --tty \ | |
|
1070 | --name=\"$container_name\" svn bash" | |
|
1071 | ||
|
1072 | } | |
|
1073 | ||
|
1074 | # :command.function | |
|
1075 | 1099 | dev_tools_celery_command() { |
|
1076 | 1100 | # src/celery_command.sh |
|
1077 | 1101 | if [[ -v WORKSPACE_HOME ]]; |
@@ -1328,6 +1352,80 b' dev_tools_sshd_command() {' | |||
|
1328 | 1352 | } |
|
1329 | 1353 | |
|
1330 | 1354 | # :command.function |
|
1355 | dev_tools_svn_command() { | |
|
1356 | # src/svn_command.sh | |
|
1357 | if [[ -v WORKSPACE_HOME ]]; | |
|
1358 | then | |
|
1359 | DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME | |
|
1360 | echo "Using default WORKSPACE_HOME path: $DEFAULT_WORKSPACE_HOME" | |
|
1361 | else | |
|
1362 | echo "WORKSPACE_HOME env var is not set" | |
|
1363 | exit 1 | |
|
1364 | fi | |
|
1365 | ||
|
1366 | code_workdir=${args[--workdir]} | |
|
1367 | cmd_script=${args[--cmd]} | |
|
1368 | ||
|
1369 | exec_script=$WORKSPACE_HOME/$cmd_script | |
|
1370 | container_name=dev-svn | |
|
1371 | env_file=".custom/.dev.env" | |
|
1372 | ||
|
1373 | echo "Using exec script: $exec_script" | |
|
1374 | ||
|
1375 | RC_DEV_CMD_HELP="apachectl -D FOREGROUND" | |
|
1376 | ||
|
1377 | if [[ ! -f $exec_script ]]; then | |
|
1378 | echo "Generating new $exec_script file..." | |
|
1379 | mkdir -p $(dirname $exec_script) | |
|
1380 | ||
|
1381 | cat <<< " | |
|
1382 | # Generated dev-env script for svn | |
|
1383 | ||
|
1384 | echo \"Run svn dev using the following command:\" | |
|
1385 | echo \"++++++++++++++++++++++++++++++++++++++++++++++++++\" | |
|
1386 | echo \"$RC_DEV_CMD_HELP\" | |
|
1387 | echo \"++++++++++++++++++++++++++++++++++++++++++++++++++\" | |
|
1388 | make sh | |
|
1389 | " > $exec_script | |
|
1390 | chmod +x $exec_script | |
|
1391 | fi | |
|
1392 | ||
|
1393 | docker_exec_script="/var/opt/rhodecode_repo_store/$cmd_script" | |
|
1394 | ||
|
1395 | docker_id=$(docker ps -q --filter "name=$container_name" --filter name="rc_cluster_apps-svn") | |
|
1396 | ||
|
1397 | if [[ $docker_id ]]; then | |
|
1398 | echo $container_name FOUND, Killing old one ! | |
|
1399 | docker kill -s 9 $docker_id | |
|
1400 | sleep 5 | |
|
1401 | docker rm -fv $container_name | |
|
1402 | echo "done..." | |
|
1403 | else | |
|
1404 | echo $container_name not found | |
|
1405 | fi | |
|
1406 | ||
|
1407 | eval " | |
|
1408 | WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME RC_DEV_CMD_HELP=\"$RC_DEV_CMD_HELP\" \ | |
|
1409 | ./rcstack stack --env-file-path $env_file rhodecode -f docker-compose-apps.dev.yaml \ | |
|
1410 | 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 \ | |
|
1411 | --workdir=\"$code_workdir\" \ | |
|
1412 | --name=\"$container_name\" \ | |
|
1413 | --interactive --tty \ | |
|
1414 | svn bash $docker_exec_script" | |
|
1415 | ||
|
1416 | } | |
|
1417 | ||
|
1418 | # :command.function | |
|
1419 | dev_tools_svnd_command() { | |
|
1420 | # src/svnd_command.sh | |
|
1421 | echo "# this file is located in 'src/svnd_command.sh'" | |
|
1422 | echo "# code for 'dev-tools svnd' goes here" | |
|
1423 | echo "# you can edit it freely and regenerate (it will not be overwritten)" | |
|
1424 | inspect_args | |
|
1425 | ||
|
1426 | } | |
|
1427 | ||
|
1428 | # :command.function | |
|
1331 | 1429 | dev_tools_tools_command() { |
|
1332 | 1430 | # src/tools_command.sh |
|
1333 | 1431 | container_name=dev-tools |
@@ -1706,13 +1804,6 b' parse_requirements() {' | |||
|
1706 | 1804 | shift $# |
|
1707 | 1805 | ;; |
|
1708 | 1806 | |
|
1709 | svn | s) | |
|
1710 | action="svn" | |
|
1711 | shift | |
|
1712 | dev_tools_svn_parse_requirements "$@" | |
|
1713 | shift $# | |
|
1714 | ;; | |
|
1715 | ||
|
1716 | 1807 | celery) |
|
1717 | 1808 | action="celery" |
|
1718 | 1809 | shift |
@@ -1741,6 +1832,20 b' parse_requirements() {' | |||
|
1741 | 1832 | shift $# |
|
1742 | 1833 | ;; |
|
1743 | 1834 | |
|
1835 | svn) | |
|
1836 | action="svn" | |
|
1837 | shift | |
|
1838 | dev_tools_svn_parse_requirements "$@" | |
|
1839 | shift $# | |
|
1840 | ;; | |
|
1841 | ||
|
1842 | svnd) | |
|
1843 | action="svnd" | |
|
1844 | shift | |
|
1845 | dev_tools_svnd_parse_requirements "$@" | |
|
1846 | shift $# | |
|
1847 | ;; | |
|
1848 | ||
|
1744 | 1849 | tools | t) |
|
1745 | 1850 | action="tools" |
|
1746 | 1851 | shift |
@@ -2001,13 +2106,13 b' dev_tools_ce_parse_requirements() {' | |||
|
2001 | 2106 | } |
|
2002 | 2107 | |
|
2003 | 2108 | # :command.parse_requirements |
|
2004 |
dev_tools_ |
|
|
2109 | dev_tools_celery_parse_requirements() { | |
|
2005 | 2110 | # :command.fixed_flags_filter |
|
2006 | 2111 | while [[ $# -gt 0 ]]; do |
|
2007 | 2112 | case "${1:-}" in |
|
2008 | 2113 | --help | -h) |
|
2009 | 2114 | long_usage=yes |
|
2010 |
dev_tools_ |
|
|
2115 | dev_tools_celery_usage | |
|
2011 | 2116 | exit |
|
2012 | 2117 | ;; |
|
2013 | 2118 | |
@@ -2019,12 +2124,41 b' dev_tools_svn_parse_requirements() {' | |||
|
2019 | 2124 | done |
|
2020 | 2125 | |
|
2021 | 2126 | # :command.command_filter |
|
2022 |
action=" |
|
|
2127 | action="celery" | |
|
2023 | 2128 | |
|
2024 | 2129 | # :command.parse_requirements_while |
|
2025 | 2130 | while [[ $# -gt 0 ]]; do |
|
2026 | 2131 | key="$1" |
|
2027 | 2132 | case "$key" in |
|
2133 | # :flag.case | |
|
2134 | --workdir) | |
|
2135 | ||
|
2136 | # :flag.case_arg | |
|
2137 | if [[ -n ${2+x} ]]; then | |
|
2138 | ||
|
2139 | args['--workdir']="$2" | |
|
2140 | shift | |
|
2141 | shift | |
|
2142 | else | |
|
2143 | printf "%s\n" "--workdir requires an argument: --workdir WORKDIR" >&2 | |
|
2144 | exit 1 | |
|
2145 | fi | |
|
2146 | ;; | |
|
2147 | ||
|
2148 | # :flag.case | |
|
2149 | --cmd) | |
|
2150 | ||
|
2151 | # :flag.case_arg | |
|
2152 | if [[ -n ${2+x} ]]; then | |
|
2153 | ||
|
2154 | args['--cmd']="$2" | |
|
2155 | shift | |
|
2156 | shift | |
|
2157 | else | |
|
2158 | printf "%s\n" "--cmd requires an argument: --cmd CMD" >&2 | |
|
2159 | exit 1 | |
|
2160 | fi | |
|
2161 | ;; | |
|
2028 | 2162 | |
|
2029 | 2163 | -?*) |
|
2030 | 2164 | printf "invalid option: %s\n" "$key" >&2 |
@@ -2042,16 +2176,20 b' dev_tools_svn_parse_requirements() {' | |||
|
2042 | 2176 | esac |
|
2043 | 2177 | done |
|
2044 | 2178 | |
|
2179 | # :command.default_assignments | |
|
2180 | [[ -n ${args['--workdir']:-} ]] || args['--workdir']="/home/rhodecode/rhodecode-enterprise-ce" | |
|
2181 | [[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-celery.sh" | |
|
2182 | ||
|
2045 | 2183 | } |
|
2046 | 2184 | |
|
2047 | 2185 | # :command.parse_requirements |
|
2048 | dev_tools_celery_parse_requirements() { | |
|
2186 | dev_tools_celeryd_parse_requirements() { | |
|
2049 | 2187 | # :command.fixed_flags_filter |
|
2050 | 2188 | while [[ $# -gt 0 ]]; do |
|
2051 | 2189 | case "${1:-}" in |
|
2052 | 2190 | --help | -h) |
|
2053 | 2191 | long_usage=yes |
|
2054 | dev_tools_celery_usage | |
|
2192 | dev_tools_celeryd_usage | |
|
2055 | 2193 | exit |
|
2056 | 2194 | ;; |
|
2057 | 2195 | |
@@ -2063,7 +2201,7 b' dev_tools_celery_parse_requirements() {' | |||
|
2063 | 2201 | done |
|
2064 | 2202 | |
|
2065 | 2203 | # :command.command_filter |
|
2066 | action="celery" | |
|
2204 | action="celeryd" | |
|
2067 | 2205 | |
|
2068 | 2206 | # :command.parse_requirements_while |
|
2069 | 2207 | while [[ $# -gt 0 ]]; do |
@@ -2117,18 +2255,18 b' dev_tools_celery_parse_requirements() {' | |||
|
2117 | 2255 | |
|
2118 | 2256 | # :command.default_assignments |
|
2119 | 2257 | [[ -n ${args['--workdir']:-} ]] || args['--workdir']="/home/rhodecode/rhodecode-enterprise-ce" |
|
2120 | [[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-celery.sh" | |
|
2258 | [[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-celeryd.sh" | |
|
2121 | 2259 | |
|
2122 | 2260 | } |
|
2123 | 2261 | |
|
2124 | 2262 | # :command.parse_requirements |
|
2125 |
dev_tools_ |
|
|
2263 | dev_tools_ssh_parse_requirements() { | |
|
2126 | 2264 | # :command.fixed_flags_filter |
|
2127 | 2265 | while [[ $# -gt 0 ]]; do |
|
2128 | 2266 | case "${1:-}" in |
|
2129 | 2267 | --help | -h) |
|
2130 | 2268 | long_usage=yes |
|
2131 |
dev_tools_ |
|
|
2269 | dev_tools_ssh_usage | |
|
2132 | 2270 | exit |
|
2133 | 2271 | ;; |
|
2134 | 2272 | |
@@ -2140,7 +2278,7 b' dev_tools_celeryd_parse_requirements() {' | |||
|
2140 | 2278 | done |
|
2141 | 2279 | |
|
2142 | 2280 | # :command.command_filter |
|
2143 |
action=" |
|
|
2281 | action="ssh" | |
|
2144 | 2282 | |
|
2145 | 2283 | # :command.parse_requirements_while |
|
2146 | 2284 | while [[ $# -gt 0 ]]; do |
@@ -2194,18 +2332,18 b' dev_tools_celeryd_parse_requirements() {' | |||
|
2194 | 2332 | |
|
2195 | 2333 | # :command.default_assignments |
|
2196 | 2334 | [[ -n ${args['--workdir']:-} ]] || args['--workdir']="/home/rhodecode/rhodecode-enterprise-ce" |
|
2197 |
[[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd- |
|
|
2335 | [[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-ssh.sh" | |
|
2198 | 2336 | |
|
2199 | 2337 | } |
|
2200 | 2338 | |
|
2201 | 2339 | # :command.parse_requirements |
|
2202 | dev_tools_ssh_parse_requirements() { | |
|
2340 | dev_tools_sshd_parse_requirements() { | |
|
2203 | 2341 | # :command.fixed_flags_filter |
|
2204 | 2342 | while [[ $# -gt 0 ]]; do |
|
2205 | 2343 | case "${1:-}" in |
|
2206 | 2344 | --help | -h) |
|
2207 | 2345 | long_usage=yes |
|
2208 | dev_tools_ssh_usage | |
|
2346 | dev_tools_sshd_usage | |
|
2209 | 2347 | exit |
|
2210 | 2348 | ;; |
|
2211 | 2349 | |
@@ -2217,7 +2355,7 b' dev_tools_ssh_parse_requirements() {' | |||
|
2217 | 2355 | done |
|
2218 | 2356 | |
|
2219 | 2357 | # :command.command_filter |
|
2220 | action="ssh" | |
|
2358 | action="sshd" | |
|
2221 | 2359 | |
|
2222 | 2360 | # :command.parse_requirements_while |
|
2223 | 2361 | while [[ $# -gt 0 ]]; do |
@@ -2271,18 +2409,18 b' dev_tools_ssh_parse_requirements() {' | |||
|
2271 | 2409 | |
|
2272 | 2410 | # :command.default_assignments |
|
2273 | 2411 | [[ -n ${args['--workdir']:-} ]] || args['--workdir']="/home/rhodecode/rhodecode-enterprise-ce" |
|
2274 | [[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-ssh.sh" | |
|
2412 | [[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-sshd.sh" | |
|
2275 | 2413 | |
|
2276 | 2414 | } |
|
2277 | 2415 | |
|
2278 | 2416 | # :command.parse_requirements |
|
2279 |
dev_tools_s |
|
|
2417 | dev_tools_svn_parse_requirements() { | |
|
2280 | 2418 | # :command.fixed_flags_filter |
|
2281 | 2419 | while [[ $# -gt 0 ]]; do |
|
2282 | 2420 | case "${1:-}" in |
|
2283 | 2421 | --help | -h) |
|
2284 | 2422 | long_usage=yes |
|
2285 |
dev_tools_s |
|
|
2423 | dev_tools_svn_usage | |
|
2286 | 2424 | exit |
|
2287 | 2425 | ;; |
|
2288 | 2426 | |
@@ -2294,7 +2432,7 b' dev_tools_sshd_parse_requirements() {' | |||
|
2294 | 2432 | done |
|
2295 | 2433 | |
|
2296 | 2434 | # :command.command_filter |
|
2297 |
action="s |
|
|
2435 | action="svn" | |
|
2298 | 2436 | |
|
2299 | 2437 | # :command.parse_requirements_while |
|
2300 | 2438 | while [[ $# -gt 0 ]]; do |
@@ -2348,7 +2486,84 b' dev_tools_sshd_parse_requirements() {' | |||
|
2348 | 2486 | |
|
2349 | 2487 | # :command.default_assignments |
|
2350 | 2488 | [[ -n ${args['--workdir']:-} ]] || args['--workdir']="/home/rhodecode/rhodecode-enterprise-ce" |
|
2351 |
[[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-s |
|
|
2489 | [[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-svn.sh" | |
|
2490 | ||
|
2491 | } | |
|
2492 | ||
|
2493 | # :command.parse_requirements | |
|
2494 | dev_tools_svnd_parse_requirements() { | |
|
2495 | # :command.fixed_flags_filter | |
|
2496 | while [[ $# -gt 0 ]]; do | |
|
2497 | case "${1:-}" in | |
|
2498 | --help | -h) | |
|
2499 | long_usage=yes | |
|
2500 | dev_tools_svnd_usage | |
|
2501 | exit | |
|
2502 | ;; | |
|
2503 | ||
|
2504 | *) | |
|
2505 | break | |
|
2506 | ;; | |
|
2507 | ||
|
2508 | esac | |
|
2509 | done | |
|
2510 | ||
|
2511 | # :command.command_filter | |
|
2512 | action="svnd" | |
|
2513 | ||
|
2514 | # :command.parse_requirements_while | |
|
2515 | while [[ $# -gt 0 ]]; do | |
|
2516 | key="$1" | |
|
2517 | case "$key" in | |
|
2518 | # :flag.case | |
|
2519 | --workdir) | |
|
2520 | ||
|
2521 | # :flag.case_arg | |
|
2522 | if [[ -n ${2+x} ]]; then | |
|
2523 | ||
|
2524 | args['--workdir']="$2" | |
|
2525 | shift | |
|
2526 | shift | |
|
2527 | else | |
|
2528 | printf "%s\n" "--workdir requires an argument: --workdir WORKDIR" >&2 | |
|
2529 | exit 1 | |
|
2530 | fi | |
|
2531 | ;; | |
|
2532 | ||
|
2533 | # :flag.case | |
|
2534 | --cmd) | |
|
2535 | ||
|
2536 | # :flag.case_arg | |
|
2537 | if [[ -n ${2+x} ]]; then | |
|
2538 | ||
|
2539 | args['--cmd']="$2" | |
|
2540 | shift | |
|
2541 | shift | |
|
2542 | else | |
|
2543 | printf "%s\n" "--cmd requires an argument: --cmd CMD" >&2 | |
|
2544 | exit 1 | |
|
2545 | fi | |
|
2546 | ;; | |
|
2547 | ||
|
2548 | -?*) | |
|
2549 | printf "invalid option: %s\n" "$key" >&2 | |
|
2550 | exit 1 | |
|
2551 | ;; | |
|
2552 | ||
|
2553 | *) | |
|
2554 | # :command.parse_requirements_case | |
|
2555 | # :command.parse_requirements_case_simple | |
|
2556 | printf "invalid argument: %s\n" "$key" >&2 | |
|
2557 | exit 1 | |
|
2558 | ||
|
2559 | ;; | |
|
2560 | ||
|
2561 | esac | |
|
2562 | done | |
|
2563 | ||
|
2564 | # :command.default_assignments | |
|
2565 | [[ -n ${args['--workdir']:-} ]] || args['--workdir']="/home/rhodecode/rhodecode-enterprise-ce" | |
|
2566 | [[ -n ${args['--cmd']:-} ]] || args['--cmd']=".dev-env/cmd-svnd.sh" | |
|
2352 | 2567 | |
|
2353 | 2568 | } |
|
2354 | 2569 | |
@@ -3171,11 +3386,12 b' run() {' | |||
|
3171 | 3386 | "vcs") dev_tools_vcs_command ;; |
|
3172 | 3387 | "ee") dev_tools_ee_command ;; |
|
3173 | 3388 | "ce") dev_tools_ce_command ;; |
|
3174 | "svn") dev_tools_svn_command ;; | |
|
3175 | 3389 | "celery") dev_tools_celery_command ;; |
|
3176 | 3390 | "celeryd") dev_tools_celeryd_command ;; |
|
3177 | 3391 | "ssh") dev_tools_ssh_command ;; |
|
3178 | 3392 | "sshd") dev_tools_sshd_command ;; |
|
3393 | "svn") dev_tools_svn_command ;; | |
|
3394 | "svnd") dev_tools_svnd_command ;; | |
|
3179 | 3395 | "tools") dev_tools_tools_command ;; |
|
3180 | 3396 | "dev-env") dev_tools_dev_env_command ;; |
|
3181 | 3397 | "prune") dev_tools_prune_command ;; |
General Comments 0
You need to be logged in to leave comments.
Login now