File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 23
23
uses : actions/checkout@v4
24
24
- name : Functional tests on heroku:${{ matrix.stack_number }}-build
25
25
run : test/run
26
+
27
+ shell-lint :
28
+ runs-on : ubuntu-22.04
29
+ container :
30
+ image : koalaman/shellcheck-alpine:v0.9.0
31
+ steps :
32
+ - uses : actions/checkout@v4
33
+ - name : shellcheck
34
+ run : shellcheck -x bin/compile bin/detect bin/release bin/report
Original file line number Diff line number Diff line change 1
1
test : heroku-22-build heroku-20-build
2
2
3
+ shellcheck :
4
+ @shellcheck -x bin/compile bin/detect bin/release bin/report
5
+
3
6
heroku-22-build :
4
7
@echo " Running tests in docker (heroku-22-build)..."
5
8
@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;'
Original file line number Diff line number Diff line change 69
69
# like>> :repo:deb http://cz.archive.ubuntu.com/ubuntu artful main universe
70
70
if grep -q -e " ^:repo:" " $BUILD_DIR /Aptfile" ; then
71
71
topic " Adding custom repositories"
72
- cat " $BUILD_DIR /Aptfile " | grep -s -e " ^:repo:" | sed ' s/^:repo:\(.*\)\s*$/\1/g' >> " $APT_SOURCES "
72
+ grep -s -e " ^:repo:" " $BUILD_DIR /Aptfile " | sed ' s/^:repo:\(.*\)\s*$/\1/g' >> " $APT_SOURCES "
73
73
fi
74
74
fi
75
75
@@ -80,7 +80,7 @@ APT_OPTIONS+=("-o" "dir::etc::sourcelist=$APT_SOURCES" "-o" "dir::etc::sourcepar
80
80
topic " Updating apt caches"
81
81
apt-get " ${APT_OPTIONS[@]} " update 2>&1 | indent
82
82
83
- for PACKAGE in $( cat " $BUILD_DIR /Aptfile " | grep -v -s -e ' ^# ' | grep -v -s -e " ^:repo: " ) ; do
83
+ while IFS= read -r PACKAGE ; do
84
84
if [[ $PACKAGE == * deb ]]; then
85
85
PACKAGE_NAME=$( basename " $PACKAGE " .deb)
86
86
PACKAGE_FILE=$APT_CACHE_DIR /archives/$PACKAGE_NAME .deb
@@ -91,7 +91,7 @@ for PACKAGE in $(cat "$BUILD_DIR/Aptfile" | grep -v -s -e '^#' | grep -v -s -e "
91
91
topic " Fetching .debs for $PACKAGE "
92
92
apt-get " ${APT_OPTIONS[@]} " -y " ${APT_FORCE_YES[@]} " -d install --reinstall " $PACKAGE " | indent
93
93
fi
94
- done
94
+ done < <( grep --invert-match -e " ^# " -e " ^\s*$ " -e " ^:repo: " " ${BUILD_DIR} /Aptfile " )
95
95
96
96
mkdir -p " $BUILD_DIR /.apt"
97
97
You can’t perform that action at this time.
0 commit comments