Add formatting check for shell scripts

pull/106/head
Muhammad Atif Ali 2 years ago
parent 98bb94c5f0
commit bf6f3b7e01

Binary file not shown.

@ -8,7 +8,8 @@ BOLD='\033[0;1m'
printf "$${BOLD}Logging into Coder...\n\n$${RESET}" printf "$${BOLD}Logging into Coder...\n\n$${RESET}"
if ! coder list > /dev/null 2>&1; then if ! coder list > /dev/null 2>&1; then
set +x; coder login --token="${CODER_USER_TOKEN}" --url="${CODER_DEPLOYMENT_URL}" set +x
coder login --token="${CODER_USER_TOKEN}" --url="${CODER_DEPLOYMENT_URL}"
else else
echo "You are already authenticated with coder." echo "You are already authenticated with coder."
fi fi

@ -2,14 +2,15 @@
"name": "modules", "name": "modules",
"scripts": { "scripts": {
"test": "bun test", "test": "bun test",
"fmt": "bun x prettier -w **/*.ts **/*.md *.md && terraform fmt **/*.tf", "fmt": "bun x prettier --plugin prettier-plugin-sh -w **/*.sh **/*.ts **/*.md *.md && terraform fmt **/*.tf",
"fmt:ci": "bun x prettier --check **/*.ts **/*.md *.md && terraform fmt -check **/*.tf", "fmt:ci": "bun x prettier --plugin prettier-plugin-sh --check **/*.sh **/*.ts **/*.md *.md && terraform fmt -check **/*.tf",
"lint": "bun run lint.ts" "lint": "bun run lint.ts"
}, },
"devDependencies": { "devDependencies": {
"bun-types": "^1.0.3", "bun-types": "^1.0.3",
"gray-matter": "^4.0.3", "gray-matter": "^4.0.3",
"marked": "^9.0.3" "marked": "^9.0.3",
"prettier-plugin-sh": "^0.13.1"
}, },
"peerDependencies": { "peerDependencies": {
"typescript": "^5.0.0" "typescript": "^5.0.0"

@ -1,7 +1,8 @@
#!/usr/bin/env sh #!/usr/bin/env sh
PROVIDER_ID=${PROVIDER_ID} PROVIDER_ID=${PROVIDER_ID}
SLACK_MESSAGE=$(cat << "EOF" SLACK_MESSAGE=$(
cat << "EOF"
${SLACK_MESSAGE} ${SLACK_MESSAGE}
EOF EOF
) )

Loading…
Cancel
Save