Skip to content

Commit 3e61856

Browse files
committed
add update script
1 parent c81c0c9 commit 3e61856

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

update.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/sh
2+
3+
script_dir=$(dirname "$0")
4+
5+
. "$script_dir"/lib.sh
6+
7+
kind=$1
8+
9+
# shift if we have to
10+
if [ "$kind" = "full" ] || [ "$kind" = "webapp" ] || [ "$kind" = "worker" ]; then
11+
shift
12+
fi
13+
14+
echo $kind
15+
16+
# default to full
17+
if [ -z "$kind" ] || ( [ "$kind" != "webapp" ] && [ "$kind" != "worker" ] ); then
18+
kind="full"
19+
fi
20+
21+
if [ "$kind" = "full" ]; then
22+
compose_file=$script_dir/docker-compose.yml
23+
extra_args="-p=trigger"
24+
else
25+
compose_file=$script_dir/docker-compose.$kind.yml
26+
extra_args="-p=trigger-$kind"
27+
fi
28+
29+
docker_compose -f "$compose_file" "$extra_args" pull "$@"

0 commit comments

Comments
 (0)