Skip to content

Commit 7eed4cb

Browse files
authored
feat!: add shellcheck 0.10.0 (#12)
Support for building older releases was dropped, but they are built and published to GitHub releases already so it won't be needed anyway.
1 parent 30d9443 commit 7eed4cb

11 files changed

+2211
-4113
lines changed

.github/workflows/ci.yaml

+11-15
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,20 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
21-
- name: Setup Node.js
22-
uses: actions/setup-node@v3
21+
- name: Setup Node.js and NPM
22+
uses: volta-cli/action@v4
23+
- name: Install dependencies
24+
run: npm install
2325
- name: Check
2426
run: npm run check
2527
- name: ShellCheck
2628
uses: ludeeus/action-shellcheck@master
2729
with:
2830
severity: error
29-
ignore_paths: ./node_modules
31+
scandir: ./scripts
3032

3133
release:
3234
runs-on: ubuntu-latest
@@ -36,27 +38,21 @@ jobs:
3638
strategy:
3739
matrix:
3840
include:
39-
- version: '0.9.0'
40-
homebrew-version: '0.9.0'
41-
- version: '0.8.0'
42-
homebrew-version: '0.8.0'
43-
- version: '0.7.2'
44-
homebrew-version: '0.7.2-1'
41+
- version: '0.10.0'
4542
fail-fast: false
4643
steps:
4744
- name: Set environment variables
4845
run: |
4946
echo "VERSION=${{ matrix.version }}" >> $GITHUB_ENV
50-
echo "HOMEBREW_VERSION=${{ matrix.homebrew-version }}" >> $GITHUB_ENV
5147
echo "TAG=v${{ matrix.version }}" >> $GITHUB_ENV
5248
- name: Checkout
53-
uses: actions/checkout@v3
49+
uses: actions/checkout@v4
5450
with:
5551
fetch-depth: 0
5652
- name: Set up Docker Buildx
57-
uses: docker/setup-buildx-action@v2
53+
uses: docker/setup-buildx-action@v3
5854
- name: Build packages
59-
uses: docker/bake-action@v2
55+
uses: docker/bake-action@v4
6056
- name: Create GitHub release
6157
if: github.event_name == 'push'
6258
env:
@@ -71,7 +67,7 @@ jobs:
7167
contents: write
7268
steps:
7369
- name: Checkout
74-
uses: actions/checkout@v3
70+
uses: actions/checkout@v4
7571
with:
7672
fetch-depth: 0
7773
- name: Set latest release

.husky/pre-commit

100755100644
+1-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
#!/usr/bin/env sh
2-
3-
# shellcheck source=./_/husky.sh
4-
. "$(dirname -- "$0")/_/husky.sh"
5-
6-
npx --no -- lint-staged
1+
npx lint-staged

.lintstagedrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"*.{sh}": "prettier --write"
2+
"*.sh": "prettier --write"
33
}

.prettierrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"printWidth": 80,
44
"semi": true,
55
"singleQuote": true,
6-
"trailingComma": "none"
6+
"trailingComma": "none",
7+
"plugins": ["prettier-plugin-sh"]
78
}

Dockerfile

-9
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
# ================
66
# ShellCheck version
77
ARG VERSION
8-
ARG HOMEBREW_VERSION
9-
10-
# ================
11-
# DARWIN ARM64
12-
# ================
13-
FROM --platform=darwin/arm64 ghcr.io/homebrew/core/shellcheck:$HOMEBREW_VERSION AS darwin-arm64
148

159
# ================
1610
# ARCHIVES
@@ -27,9 +21,6 @@ RUN apk add --no-cache \
2721

2822
ARG VERSION
2923

30-
# Copy Darwin arm64 binary
31-
COPY --from=darwin-arm64 shellcheck/$VERSION/bin/shellcheck /shellcheck.darwin.arm64.data/
32-
3324
# Copy scripts directory
3425
COPY scripts /scripts
3526

README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# ShellCheck binaries for the VS Code extension
22

3-
ShellCheck binaries distributed in `.tar.gz` format for Linux and macOS, including M1 Macs. Used by [ShellCheck VS Code extension](https://github.com/vscode-shellcheck/vscode-shellcheck).
3+
ShellCheck binaries distributed in `.tar.gz` format for Linux and macOS. Used by [ShellCheck VS Code extension](https://github.com/vscode-shellcheck/vscode-shellcheck).
44

55
## Why?
66

7-
- ShellCheck doesn't officially provide binaries for M1 Macs.
8-
- ShellCheck ships binaries packaged in `.tar.xz` format, in which [`bindl`](https://github.com/felipecrs/bindl/issues/217) doesn't support.
7+
- ShellCheck ships binaries packaged in `.tar.xz` format, in which [`bindl`](https://github.com/felipecrs/bindl/issues/217) doesn't support by default.
98

109
## How to generate more binaries?
1110

@@ -14,7 +13,7 @@ Simply push a new tag to this repository in the format `v*.*.*` matching the [Sh
1413
Example:
1514

1615
```console
17-
git push origin HEAD:refs/tags/v0.8.0 --force
16+
git push origin HEAD:refs/tags/v0.10.0 --force
1817
```
1918

2019
## Development

docker-bake.hcl

-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
variable "VERSION" {}
22

3-
variable "HOMEBREW_VERSION" {
4-
default = "${VERSION}"
5-
}
6-
73
target "default" {
84
dockerfile = "Dockerfile"
95
args = {
106
VERSION = "${VERSION}"
11-
HOMEBREW_VERSION = "${HOMEBREW_VERSION}"
127
}
138
output = ["./dist"]
149
}

0 commit comments

Comments
 (0)