forked from heroku/heroku-buildpack-apt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
26 changed files
with
1,964 additions
and
110 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @heroku/languages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
functional-test: | ||
runs-on: ubuntu-22.04 | ||
container: | ||
image: heroku/heroku:${{ matrix.stack_number }}-build | ||
options: --user root | ||
strategy: | ||
matrix: | ||
stack_number: ["20", "22", "24"] | ||
env: | ||
STACK: heroku-${{ matrix.stack_number }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Functional tests on heroku:${{ matrix.stack_number }}-build | ||
run: test/run | ||
|
||
shell-lint: | ||
runs-on: ubuntu-22.04 | ||
container: | ||
image: koalaman/shellcheck-alpine:v0.9.0 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: shellcheck | ||
run: shellcheck -x bin/compile bin/detect bin/release bin/report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.anvil | ||
.idea |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
test: heroku-24-build heroku-22-build heroku-20-build | ||
|
||
shellcheck: | ||
@shellcheck -x bin/compile bin/detect bin/release bin/report | ||
|
||
heroku-24-build: | ||
@echo "Running tests in docker (heroku-24-build)..." | ||
@docker run --user root -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-24" heroku/heroku:24-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;' | ||
@echo "" | ||
|
||
heroku-22-build: | ||
@echo "Running tests in docker (heroku-22-build)..." | ||
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-22" heroku/heroku:22-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;' | ||
@echo "" | ||
|
||
heroku-20-build: | ||
@echo "Running tests in docker (heroku-20-build)..." | ||
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-20" heroku/heroku:20-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;' | ||
@echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env bash | ||
# bin/report <build-dir> <cache-dir> <env-dir> | ||
|
||
### Configure environment | ||
|
||
set -o errexit # always exit on error | ||
set -o pipefail # don't ignore exit codes when piping output | ||
|
||
BUILD_DIR=${1:-} | ||
|
||
packages=() | ||
custom_packages=() | ||
custom_repositories=() | ||
|
||
while IFS= read -r line; do | ||
if grep --silent -e "^:repo:" <<< "${line}"; then | ||
custom_repositories+=("${line//:repo:/}") | ||
elif [[ $line == *deb ]]; then | ||
custom_packages+=("${line}") | ||
else | ||
IFS=$' \t' read -ra package_names <<< "${line}" | ||
for package_name in "${package_names[@]}"; do | ||
packages+=("${package_name}") | ||
done | ||
fi | ||
done < <(grep --invert-match -e "^\s*#" -e "^\s*$" "${BUILD_DIR}/Aptfile") | ||
|
||
output_key_value() { | ||
local key value | ||
key="$1" | ||
shift | ||
# sort & join the array values with a ',' then escape both '\' and '"' characters | ||
value=$(printf '%s\n' "$@" | sort | tr '\n' ',' | sed 's/,$/\n/' | sed 's/\\/\\\\/g' | sed 's/"/\\"/g') | ||
if [[ -n "${value}" ]]; then | ||
echo "$key: \"$value\"" | ||
fi | ||
} | ||
|
||
output_key_value "packages" "${packages[@]}" | ||
output_key_value "custom_packages" "${custom_packages[@]}" | ||
output_key_value "custom_repositories" "${custom_repositories[@]}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[buildpack] | ||
name = "Apt" | ||
|
||
[publish.Ignore] | ||
files = [ | ||
".github/", | ||
"test/", | ||
".gitignore", | ||
"Makefile", | ||
] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.