diff options
author | Dre <dre2004@gmail.com> | 2020-07-18 00:49:32 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-17 22:49:32 +0800 |
commit | 90904b3f420d41cf56c62b6d96234b199399f3e4 (patch) | |
tree | 81a1daa4167e77a97fb645cc13d1bd245d145e88 | |
parent | a7afa1161071e2a41e969ddd24d29661435f1747 (diff) |
workflow: add shellcheck as a linter (#6202)
Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
-rw-r--r-- | .github/workflows/shell.yml | 13 | ||||
-rwxr-xr-x | scripts/build.sh | 8 |
2 files changed, 18 insertions, 3 deletions
diff --git a/.github/workflows/shell.yml b/.github/workflows/shell.yml new file mode 100644 index 00000000..1926472c --- /dev/null +++ b/.github/workflows/shell.yml @@ -0,0 +1,13 @@ +name: Shell +on: + push: + branches: [master] + pull_request: +jobs: + shellcheck: + name: Shellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@master diff --git a/scripts/build.sh b/scripts/build.sh index cf127c2a..53dcdf6a 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,11 +1,13 @@ +#!/bin/bash + outPath=./output rm -rf $outPath mkdir $outPath go build ../gogs.go -PLATFORM=`uname | cut -d _ -f 1` -if [ $PLATFORM = "MINGW32" ] || [ $PLATFORM = "MINGW64" ] || [ $PLATFORM = "CYGWIN" ]; then +PLATFORM=$(uname | cut -d _ -f 1) +if [ "$PLATFORM" = "MINGW32" ] || [ "$PLATFORM" = "MINGW64" ] || [ "$PLATFORM" = "CYGWIN" ]; then GOGS_EXE=gogs.exe else GOGS_EXE=gogs @@ -28,4 +30,4 @@ cp ../README_ZH.md $outPath/ cp start.bat $outPath/ cp start.sh $outPath/ cp ../wercker.yml $outPath/ -cp mysql.sql $outPath/
\ No newline at end of file +cp mysql.sql $outPath/ |