Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fdc00cb
Add and config files
runesoerensen Mar 15, 2026
f635169
Add Makefile format and lint targets
runesoerensen Mar 15, 2026
30f83f5
Run `shmft` in CI
runesoerensen Mar 15, 2026
646c786
Apply `shfmt` formatting
runesoerensen Mar 15, 2026
71b6e1d
Fix ShellCheck warnings across all shell scripts
runesoerensen Mar 15, 2026
4f9307a
Standardize shebangs to `#!/usr/bin/env bash`
runesoerensen Mar 15, 2026
075c075
Use `BUILDPACK_DIR` with `BASH_SOURCE[0]` for buildpack path resolution
runesoerensen Mar 15, 2026
e7c03ca
Add `set -euo pipefail` to all buildpack scripts
runesoerensen Mar 15, 2026
6a5dedc
Convert `sbin/add-version` to bash
runesoerensen Mar 15, 2026
5c6c008
Source `output.sh` explicitly in callers instead of in `common.sh`
runesoerensen Mar 15, 2026
80731bd
Remove unnecessary `mkdir -p` for build and cache dirs
runesoerensen Mar 15, 2026
e917c32
Assign buildpack args directly
runesoerensen Mar 15, 2026
8cb64b5
Add consistent comment for `BUILDPACK_DIR` across all scripts
runesoerensen Mar 15, 2026
63dbe79
Rename `build` variable to `BUILD_DIR`
runesoerensen Mar 15, 2026
0fc3882
Rename `env_dir` variable to `ENV_DIR`
runesoerensen Mar 15, 2026
c4770c3
Rename `cache`/`cache_root` variable to `CACHE_DIR`
runesoerensen Mar 15, 2026
88ca6ed
Setup `GO_CACHE_DIR` after setting script arg dirs
runesoerensen Mar 15, 2026
00d631f
Clean up `bin/detect` tool detection formatting
runesoerensen Mar 15, 2026
781e58c
Quote glob in `bin/test` env dir loop
runesoerensen Mar 15, 2026
f2ad1ea
Remove broken no-op `pushd`/`popd`
runesoerensen Mar 15, 2026
8bc36cc
Use `BASH_SOURCE[0]` for path resolution
runesoerensen Mar 15, 2026
d142bb5
Replace shellcheck shell directive with shebang
runesoerensen Mar 15, 2026
310df53
Narrow shellcheck disables in `lib/common.sh` to per-line scope
runesoerensen Mar 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# https://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.sh]
binary_next_line = true
# We use tabs in shell scripts since heredoc indent stripping (<<-) requires them:
# https://www.gnu.org/software/bash/manual/html_node/Redirections.html#Here-Documents
indent_style = tab
shell_variant = bash
switch_case_indent = true

# Catches scripts without a .sh file extension, such as the Buildpack API scripts.
[**/bin/**]
binary_next_line = true
indent_style = tab
shell_variant = bash
switch_case_indent = true

# Catches sbin/ scripts without a .sh extension.
[**/sbin/**]
binary_next_line = true
indent_style = tab
shell_variant = bash
switch_case_indent = true

# Vendored third-party script that must not be modified.
[test/shunit2.sh]
ignore = true

[Makefile]
indent_style = tab
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,22 @@ on:
permissions:
contents: read

env:
FORCE_COLOR: 1

jobs:
lint:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run ShellCheck
run: make lint-scripts
- name: Run shfmt
uses: docker://mvdan/shfmt:latest
with:
args: "--diff ."

integration-test:
runs-on: ubuntu-latest
strategy:
Expand Down
2 changes: 2 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Enable all checks, including the optional ones that are off by default.
enable=all
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
.PHONY: test test-parallel run run-ci publish
.PHONY: lint lint-scripts check-format format test test-parallel run run-ci publish

lint: lint-scripts check-format

lint-scripts:
@git ls-files -z --cached --others --exclude-standard 'bin/*' 'sbin/*' '*.sh' \
| grep -zv '^test/shunit2\.sh$$' \
| xargs -0 shellcheck --check-sourced --color=always

check-format:
@shfmt --diff .

format:
@shfmt --write --list .

STACK ?= heroku-24
FIXTURE ?= test/fixtures/mod-basic-go126
Expand Down
Loading