-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcompute_change.sh
50 lines (47 loc) · 1.13 KB
/
compute_change.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
DELTA=changed_directories
git diff --name-only HEAD HEAD~1 > $DELTA
export CHANGE_ANY=false
if grep fib-go $DELTA
then
export CHANGE_FIB_GO=true
export CHANGE_ANY=true
else
export CHANGE_FIB_GO=false
fi
if grep fib-node $DELTA
then
export CHANGE_FIB_NODE=true
export CHANGE_ANY=true
else
export CHANGE_FIB_NODE=false
fi
if grep fib-quarkus $DELTA
then
export CHANGE_FIB_QUARKUS=true
export CHANGE_ANY=true
else
export CHANGE_FIB_QUARKUS=false
fi
if grep haproxy $DELTA
then
export CHANGE_HAPROXY=true
export CHANGE_ANY=true
else
export CHANGE_HAPROXY=false
fi
if grep frontend $DELTA
then
export CHANGE_FRONTEND=true
export CHANGE_ANY=true
else
export CHANGE_FRONTEND=false
fi
echo Files Changed
cat $DELTA
rm -rf $DELTA
echo "CHANGE_FIB_GO=${CHANGE_FIB_GO}" | tee -a $GITHUB_ENV
echo "CHANGE_FIB_NODE=${CHANGE_FIB_NODE}" | tee -a $GITHUB_ENV
echo "CHANGE_FIB_QUARKUS=${CHANGE_FIB_QUARKUS}" | tee -a $GITHUB_ENV
echo "CHANGE_FRONTEND=${CHANGE_FRONTEND}" | tee -a $GITHUB_ENV
echo "CHANGE_HAPROXY=${CHANGE_HAPROXY}" | tee -a $GITHUB_ENV
echo "CHANGE_ANY=${CHANGE_ANY}" | tee -a $GITHUB_ENV