Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Locked shellcheck version to v0.7.0 #17

Merged
merged 1 commit into from
Apr 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Update Shellcheck
run: ./src/download_shellcheck.sh
- name: Run tests
run: ./tests/test_runner
shell: bash
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM alpine:3.10.3

RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories; \
apk update && apk add --no-cache shellcheck bash
RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.11/community" >> /etc/apk/repositories; \
apk update && apk add --no-cache bash shellcheck=0.7.0-r1

RUN bash --version && shellcheck --version

COPY entrypoint.sh /entrypoint.sh

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,37 +23,37 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Lint check
uses: azohra/shell-linter@v0.2.0
uses: azohra/shell-linter@v0.3.0
```

Run static analysis for a single shell script.
```yml
- name: Lint check
uses: azohra/shell-linter@v0.2.0
uses: azohra/shell-linter@v0.3.0
with:
path: "setup.sh"
```

Run static analysis for multiple shell scripts **with or without** extension.
```yml
- name: Lint check
uses: azohra/shell-linter@v0.2.0
uses: azohra/shell-linter@v0.3.0
with:
path: "setup,deploy.sh"
```

Run static analysis for all the shell scripts in a folder.
```yml
- name: Lint check
uses: azohra/shell-linter@v0.2.0
uses: azohra/shell-linter@v0.3.0
with:
path: "src"
```

Run static analysis using a **wildcard** path
```yml
- name: Lint check
uses: azohra/shell-linter@v0.2.0
uses: azohra/shell-linter@v0.3.0
with:
path: "src/*.sh"
```
Expand Down
8 changes: 8 additions & 0 deletions src/download_shellcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#! /bin/bash

# Update shellcheck to the locked v0.7.0 version through the binary distribution
scversion='v0.7.0'

wget -qO- "https://storage.googleapis.com/shellcheck/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv
sudo cp "shellcheck-${scversion}/shellcheck" /usr/bin/
shellcheck --version