Skip to content

Commit 2609b6a

Browse files
authored
Fix/shellcheck (hestiacp#2801)
* Downgrade image
1 parent 2360db5 commit 2609b6a

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

.drone.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ concurrency:
106106

107107
steps:
108108
- name: Shellcheck
109-
image: koalaman/shellcheck-alpine
109+
image: koalaman/shellcheck-alpine:v0.8.0
110110
commands:
111111
- ./test/shellcheck.sh
112112
- name: PHP 8.1
@@ -116,12 +116,6 @@ steps:
116116

117117
trigger:
118118
event: [ pull_request, push ]
119-
ref:
120-
- refs/heads/staging/*
121-
- refs/heads/beta
122-
- refs/heads/release
123-
- refs/heads/main
124-
- refs/pull/*/head
125119

126120
---
127121
kind: pipeline
@@ -173,4 +167,4 @@ trigger:
173167

174168
---
175169
kind: signature
176-
hmac: a191a477aa337f2efff534022164906ff20ef2b6340ec808d128c09a06d7eaa3
170+
hmac: f89a311b0f023c6ee92dbdb56bcd23ec663ef9242269a6b70c1c222bac4380ee

test/shellcheck.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@
2222

2323
#set default value for error
2424
err=0;
25+
shellcheck --version
2526

2627
files=$(grep -rlE '#!/bin/(bash|sh)' ./ | grep -vE '\.(git|j2$|md$)');
2728
for file in $files; do
2829
echo "Linting: $file"
29-
shellcheck -x "$file" --severity="error" -e "SC2086,SC2002,SC2153,SC2181,SC2153,SC2129,SC2016,SC2196,SC1090,SC2031,SC2010,SC2143,SC2046"
30+
shellcheck -x "$file" --severity="error"
3031
if [ $? -gt 0 ]; then
3132
printf "%s: \033[0;31m Fail \033[0m\n" "$file"
3233
err=1
@@ -40,10 +41,3 @@ if [ $err == 1 ];
4041
then
4142
exit "$err";
4243
fi
43-
44-
for file in $files; do
45-
echo "Linting: $file"
46-
shellcheck -x "$file" -e "SC2086,SC2002,SC2153,SC2181,SC2153,SC2129,SC2016,SC2196,SC1090,SC2031,SC2010,SC2143,SC2046"
47-
done
48-
49-
exit "$err";

0 commit comments

Comments
 (0)