chore: Add .editorconfig, shfmt, shellcheck and subshell dir changes (#1649)

This commit is contained in:
Mathias Fredriksson
2022-05-27 20:15:19 +03:00
committed by GitHub
parent 1a70298b5c
commit 608eb322a8
11 changed files with 191 additions and 103 deletions
+31 -27
View File
@@ -7,33 +7,37 @@
set -euo pipefail
PROJECT_ROOT=$(git rev-parse --show-toplevel)
cd "$PROJECT_ROOT/site"
SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
PROJECT_ROOT=$(cd "$SCRIPT_DIR" && git rev-parse --show-toplevel)
yarn_flags=(
# Do not execute install scripts
# TODO: check if build works properly with this enabled
# --ignore-scripts
(
cd "$PROJECT_ROOT/site"
# Check if existing node_modules are valid
# TODO: determine if this is necessary
# --check-files
yarn_flags=(
# Do not execute install scripts
# TODO: check if build works properly with this enabled
# --ignore-scripts
# Check if existing node_modules are valid
# TODO: determine if this is necessary
# --check-files
)
if [ -n "${CI:-}" ]; then
yarn_flags+=(
# Install dependencies from lockfile, ensuring builds are fully
# reproducible
--frozen-lockfile
# Suppress progress information
--silent
# Disable interactive prompts for build
--non-interactive
)
fi
# Append whatever is specified on the command line
yarn_flags+=("$@")
echo "+ yarn install ${yarn_flags[*]}"
yarn install "${yarn_flags[@]}"
)
if [ -n "${CI:-}" ]; then
yarn_flags+=(
# Install dependencies from lockfile, ensuring builds are fully
# reproducible
--frozen-lockfile
# Suppress progress information
--silent
# Disable interactive prompts for build
--non-interactive
)
fi
# Append whatever is specified on the command line
yarn_flags+=("$@")
echo "+ yarn install ${yarn_flags[*]}"
yarn install "${yarn_flags[@]}"