Skip to content

Commit

Permalink
Add support for comments in Aptfiles (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmerrick authored and edmorley committed Jun 10, 2019
1 parent 0bb61ba commit ceecb67
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/compile_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

testCompile() {
cat > ${BUILD_DIR}/Aptfile <<EOF
# Test comment
s3cmd
wget
EOF
Expand Down

0 comments on commit ceecb67

Please sign in to comment.