-
Notifications
You must be signed in to change notification settings - Fork 1
/
LOGS.prod.sh
executable file
·55 lines (47 loc) · 1006 Bytes
/
LOGS.prod.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
source ./deploy/utils.sh
# COLORS
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# PARSE INPUT ARGUMENTS
BACKEND=false
WORKERS=false
SINK=false
while [[ $# -gt 0 ]]; do
key="$1"
case "${key,,}" in
backend)
BACKEND=true
shift
;;
workers)
WORKERS=true
shift
;;
sink)
SINK=true
shift
;;
*)
printf "Ignoring input argument: $key \n"
shift # Shift removes from the list the argument
;;
esac
done
# Parse input variables from the ENV files
eval $(parse_yaml ./deploy/ENV.deploy.yml)
# BACKEND was set?
if [[ "$BACKEND" = true ]]; then
# get log
get_logs_from_heroku "BACKEND" $backend_GIT_HEROKU_REMOTE
fi
# WORKERS was set?
if [[ "$WORKERS" = true ]]; then
# get log
get_logs_from_heroku "WORKERS" $workers_GIT_HEROKU_REMOTE #$HEADER
fi
# SINK was set?
if [[ "$SINK" = true ]]; then
# get log
get_logs_from_heroku "SINK" $sink_GIT_HEROKU_REMOTE
fi