Skip to content

Commit 941625d

Browse files
committed
A bit more shell-related settings
1 parent 55a860e commit 941625d

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

.devcontainer/Containerfile

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ RUN apt update && \
1010
libxkbfile-dev \
1111
libsecret-1-dev \
1212
qemu-user \
13+
shellcheck \
1314
&& \
1415
apt clean && \
1516
rm -rf /var/lib/apt/lists/* && \

.devcontainer/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Create a `.env` on the root of the project with the following content:
66
# .env
77
GH_TOKEN=your_github_token
88
npm_config_arch=your_architecture # Options are: x64, arm64, arm, riscv64, loong64, ppc64, and s390x
9-
_VSCODE_ARCH=your_vsc_architecture # Options are: x64, arm64, armhf, riscv64, loong64, ppc64le, and s390x
9+
VSCODE_ARCH=your_vsc_architecture # Options are: x64, arm64, armhf, riscv64, loong64, ppc64le, and s390x
10+
# note that VSC removes variables starting with VSCODE_ from the environment.
1011
# DISABLE_QEMU=true # Uncomment this if you prefer not to use the QEMU step in postinstall.js
1112
# Any other environment variable you want the tasks to run with or that set the build environment to your desired output architecture
1213
```

.devcontainer/devcontainer.json

+12-9
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,18 @@
2727
"ghcr.io/devcontainers/features/github-cli:1": {},
2828
"ghcr.io/devcontainers/features/docker-in-docker:2": {
2929
"dockerDashComposeVersion": "none"
30-
}
30+
},
31+
"ghcr.io/devcontainers-extra/features/shfmt:1": {}
3132
},
3233
// Uncomment if you have `sed` issues due to VirtFs
3334
// "mounts": [
3435
// "type=volume,source=vscode-src,target=${containerWorkspaceFolder}/vscode"
3536
// ],
36-
// These are better placed in the .env file
37-
// "containerEnv": {
38-
// "npm_config_arch": "ppc64",
39-
// "_VSCODE_ARCH": "ppc64le"
40-
// },
4137
"runArgs": [
4238
"--security-opt",
4339
"label=disable",
4440
"--env-file",
45-
".env" // a place to put your GH_TOKEN
41+
"${localWorkspaceFolder}/.env"
4642
],
4743
"capAdd": [
4844
"CAP_AUDIT_WRITE"
@@ -57,12 +53,19 @@
5753
// Configure properties specific to VS Code.
5854
"vscode": {
5955
// Set *default* container specific settings.json values on container create.
60-
"settings": {},
56+
"settings": {
57+
"shellformat.path": "/usr/local/bin/shfmt",
58+
"shellcheck.executablePath": "/usr/bin/shellcheck"
59+
},
6160
// Add the IDs of extensions you want installed when the container is created.
6261
"extensions": [
6362
"dbaeumer.vscode-eslint",
6463
"ms-azuretools.vscode-docker",
65-
"github.vscode-github-actions"
64+
"github.vscode-github-actions",
65+
"foxundermoon.shell-format",
66+
"rogalmic.bash-debug",
67+
"mads-hartmann.bash-ide-vscode",
68+
"timonwong.shellcheck"
6669
]
6770
}
6871
},

.vscode/tasks.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{
77
"label": "Download latest stable-linux vscode artifact",
88
"type": "shell",
9-
"command": "gh run list --workflow stable-linux --branch master --limit 1 | awk '{print $7}' | xargs -I {} gh run download {} -n vscode && sudo tar -xvzf vscode.tar.gz && sudo chown -R vscode:vscode ./vscode/",
9+
"command": "set -a && source .env || true && set +a && gh run list --workflow stable-linux --branch master --limit 1 | awk '{print $7}' | xargs -I {} gh run download {} -n vscode && sudo tar -xvzf vscode.tar.gz && sudo chown -R vscode:vscode ./vscode/",
1010
"group": {
1111
"kind": "none"
1212
},
@@ -24,7 +24,7 @@
2424
{
2525
"label": "Build Linux REH",
2626
"type": "shell",
27-
"command": "VSCODE_ARCH=\"${_VSCODE_ARCH}\" ./build/linux/package_reh.sh",
27+
"command": "set -a && source .env || true && set +a && ./build/linux/package_reh.sh",
2828
"group": {
2929
"kind": "build",
3030
"isDefault": false

0 commit comments

Comments
 (0)