Skip to content

Commit

Permalink
Upgrade to shellcheck 0.9.0 (#499)
Browse files Browse the repository at this point in the history
And fix bash lint
  • Loading branch information
mtlynch authored Sep 29, 2023
1 parent 9db1c99 commit 215f448
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
command: ./dev-scripts/check-trailing-newline
check_bash:
docker:
- image: koalaman/shellcheck-alpine:v0.8.0
- image: koalaman/shellcheck-alpine:v0.9.0
steps:
- run:
name: Install dependencies needed to check out repo
Expand Down
6 changes: 4 additions & 2 deletions dev-scripts/build-backend
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ fi
readonly BINARY
readonly GO_BUILD_TAGS

export readonly GOOS='linux'
readonly GOOS='linux'
export GOOS
if [ "${PLATFORM}" = 'linux/amd64' ]; then
GOARCH='amd64'
elif [ "${PLATFORM}" = 'linux/arm/v7' ]; then
Expand All @@ -43,7 +44,8 @@ else
echo "Unsupported platform: ${PLATFORM}"
exit 1
fi
export readonly GOARCH
readonly GOARCH
export GOARCH

# Join together build tags
BUILD_TAGS_JOINED=""
Expand Down
3 changes: 2 additions & 1 deletion docker-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ while [ "$#" -gt 0 ]; do
*) shift 1;;
esac
done
readonly DB_PATH
# We need to export DB_PATH because litestream.yml references it.
export readonly DB_PATH
export DB_PATH

is_litestream_enabled() {
set +ux
Expand Down
10 changes: 9 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
sha256 = "0wfaqjpi7bip86r2piqigqna1fx3m1d9riak4l3rm54lyjxprlpi";
}) {inherit system; };

pkgs_for_shellcheck = import (builtins.fetchTarball {
# 0.9.0 release
url = "https://github.com/NixOS/nixpkgs/archive/8b5ab8341e33322e5b66fb46ce23d724050f6606.tar.gz";
sha256 = "05ynih3wc7shg324p7icz21qx71ckivzdhkgf5xcvdz6a407v53h";
}) {inherit system; };

pkgs_for_go = import (builtins.fetchTarball {
# 1.21.1 release
url = "https://github.com/NixOS/nixpkgs/archive/78058d810644f5ed276804ce7ea9e82d92bee293.tar.gz";
Expand All @@ -36,14 +42,16 @@
gotools
pkgs_for_go.go_1_21
pkgs_for_nodejs.nodejs_20
pkgs_for_shellcheck.shellcheck
pkgs_for_sqlfluff.sqlfluff
];

shellHook = ''
sqlfluff --version
echo "shellcheck" "$(shellcheck --version | grep '^version:')"
echo "node" "$(node --version)"
echo "npm" "$(npm --version)"
go version
sqlfluff --version
'';
};
});
Expand Down

0 comments on commit 215f448

Please sign in to comment.