From ceecb67b0cb261b6bc64c2a4d1a36048fd1b26ea Mon Sep 17 00:00:00 2001 From: Dana Merrick Date: Mon, 10 Jun 2019 11:33:55 -0700 Subject: [PATCH] Add support for comments in Aptfiles (#24) --- README.md | 3 +++ bin/compile | 2 +- test/compile_test.sh | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 50f93a7..515a9ec 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,11 @@ heroku buildpacks:add --index 1 https://github.com/heroku/heroku-buildpack-apt #### Aptfile + # you can list packages libpq-dev + # or include links to specific .deb files http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.1/wkhtmltox-0.12.1_linux-precise-amd64.deb + # or add custom apt repos :repo:deb http://cz.archive.ubuntu.com/ubuntu artful main universe #### Gemfile diff --git a/bin/compile b/bin/compile index 4c52f99..c3fd679 100755 --- a/bin/compile +++ b/bin/compile @@ -59,7 +59,7 @@ APT_OPTIONS="$APT_OPTIONS -o dir::etc::sourcelist=$APT_SOURCES" topic "Updating apt caches" apt-get $APT_OPTIONS update | indent -for PACKAGE in $(cat $BUILD_DIR/Aptfile | grep -v -s -e "^:repo:"); do +for PACKAGE in $(cat $BUILD_DIR/Aptfile | grep -v -s -e '^#' | grep -v -s -e "^:repo:"); do if [[ $PACKAGE == *deb ]]; then PACKAGE_NAME=$(basename $PACKAGE .deb) PACKAGE_FILE=$APT_CACHE_DIR/archives/$PACKAGE_NAME.deb diff --git a/test/compile_test.sh b/test/compile_test.sh index 03af44d..a742ab5 100644 --- a/test/compile_test.sh +++ b/test/compile_test.sh @@ -4,6 +4,7 @@ testCompile() { cat > ${BUILD_DIR}/Aptfile <