File tree 1 file changed +8
-10
lines changed
1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
+ set -euo pipefail
2
3
3
4
ret_code=0
4
5
5
6
install_dependencies (){
6
- if [ " $RUNNER_OS " == " Linux" ]; then
7
+ if [[ " $RUNNER_OS " == " Linux" ] ]; then
7
8
# https://github.com/pypa/setuptools/issues/3269
8
9
export DEB_PYTHON_INSTALL_LAYOUT=deb
9
10
fi
@@ -12,16 +13,13 @@ install_dependencies(){
12
13
13
14
run_commit_check (){
14
15
args=" "
15
- if [ " $MESSAGE " == " true" ]; then
16
+ if [[ " $MESSAGE " == " true" ] ]; then
16
17
args=" $args --message"
17
- fi
18
- if [ " $BRANCH " == " true" ]; then
18
+ elif [[ " $BRANCH " == " true" ]]; then
19
19
args=" $args --branch"
20
- fi
21
- if [ " $AUTHOR_NAME " == " true" ]; then
20
+ elif [[ " $AUTHOR_NAME " == " true" ]]; then
22
21
args=" $args --author-name"
23
- fi
24
- if [ " $AUTHOR_EMAIL " == " true" ]; then
22
+ elif [[ " $AUTHOR_EMAIL " == " true" ]]; then
25
23
args=" $args --author-email"
26
24
fi
27
25
@@ -31,7 +29,7 @@ run_commit_check(){
31
29
}
32
30
33
31
add_job_summary (){
34
- if [ " $JOB_SUMMARY " == " false" ]; then
32
+ if [[ " $JOB_SUMMARY " == " false" ] ]; then
35
33
exit
36
34
fi
37
35
@@ -54,7 +52,7 @@ install_dependencies
54
52
run_commit_check
55
53
add_job_summary
56
54
57
- if [ " $DRY_RUN " == " true" ]; then
55
+ if [[ " $DRY_RUN " == " true" ] ]; then
58
56
ret_code=0
59
57
fi
60
58
You can’t perform that action at this time.
0 commit comments