Skip to content

Commit

Permalink
Merge pull request #4 from noprotocol/develop
Browse files Browse the repository at this point in the history
Release v1.0.0
  • Loading branch information
jobverplanke committed Apr 6, 2023
2 parents 1d8d87d + 291d046 commit 4ccee9b
Show file tree
Hide file tree
Showing 22 changed files with 24 additions and 187 deletions.
165 changes: 0 additions & 165 deletions .github/CONTRIBUTE.md

This file was deleted.

13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ This buildpack will provide the following image optimizer binaries to your Herok
- `optipng`
- `pngcrush`
- `pngquant`
- `cwebp`
- `dwebp`

This buildpack supports the following Heroku [stacks](https://devcenter.heroku.com/articles/stack):

- [heroku-16](https://devcenter.heroku.com/articles/heroku-16-stack)
- [heroku-18](https://devcenter.heroku.com/articles/heroku-18-stack)

The stack [cedar-14](https://devcenter.heroku.com/articles/cedar-14-stack) is marked as deprecated and therefore should
not be used anymore.
- [heroku-20](https://devcenter.heroku.com/articles/heroku-20-stack)
- [heroku-22](https://devcenter.heroku.com/articles/heroku-22-stack)

During compile time of this buildpack the following steps will be done:

Expand All @@ -31,7 +30,3 @@ During compile time of this buildpack the following steps will be done:

To use this buildpack you can add it by multiple ways to your Heroku app. Please see the Heroku
[documentation](https://devcenter.heroku.com/articles/buildpacks#using-a-third-party-buildpack) for further information.

## Contribute

Please refer to [CONTRIBUTING.md](.github/CONTRIBUTE.md) for information on how to contribute to this project.
33 changes: 20 additions & 13 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ source "${WORKING_DIR}/bin/util/common.sh"
# we do not 'set -o errtrace', because that would cause subshell failures to fire the trap twice, e.g. with someval=$(func_that_fails)
trap 'err_trap' ERR

status "Adding image optimizer binaries"
status "Adding image optimizer and WebP binaries"

status "Marking binaries as executable"
# Marking binaries as executable
chmod -R +x "${WORKING_DIR}/${VENDOR_DIR}"

Expand All @@ -24,10 +25,10 @@ mkdir -p "${BUILD_DIR}/${VENDOR_DIR}"
# Switch to binaries folder
cd "${WORKING_DIR}/${VENDOR_DIR}/${STACK}"

# Copy to binaries folder
cp -v * "${BUILD_DIR}/${VENDOR_DIR}" | indent

# Switch back to working directory
status "Switch back to working directory ${WORKING_DIR}"
cd "${WORKING_DIR}"

# Add binaries path to `PATH` environment
Expand All @@ -37,15 +38,18 @@ status "Make directories if they don't exist"

mkdir -p /tmp/codon/vendor/bin

status "Creating symlinks to optimizers for next buildpack(s)"
status "Creating symlinks to optimizers and WebP binaries for next buildpack(s)"

# Create symlinks to optimizers
ln -s "${BUILD_DIR}/${VENDOR_DIR}/advpng" /tmp/codon/vendor/bin/advpng
ln -s "${BUILD_DIR}/${VENDOR_DIR}/gifsicle" /tmp/codon/vendor/bin/gifsicle
ln -s "${BUILD_DIR}/${VENDOR_DIR}/jpegoptim" /tmp/codon/vendor/bin/jpegoptim
ln -s "${BUILD_DIR}/${VENDOR_DIR}/jpegtran" /tmp/codon/vendor/bin/jpegtran
ln -s "${BUILD_DIR}/${VENDOR_DIR}/optipng" /tmp/codon/vendor/bin/optipng
ln -s "${BUILD_DIR}/${VENDOR_DIR}/pngcrush" /tmp/codon/vendor/bin/pngcrush
ln -s "${BUILD_DIR}/${VENDOR_DIR}/pngquant" /tmp/codon/vendor/bin/pngquant
ln -s "${BUILD_DIR}/${VENDOR_DIR}/cwebp" /tmp/codon/vendor/bin/cwebp
ln -s "${BUILD_DIR}/${VENDOR_DIR}/dwebp" /tmp/codon/vendor/bin/dwebp

status "Adding profile.d script to add binaries to PATH at container start"

Expand All @@ -55,14 +59,17 @@ cd "${WORKING_DIR}/profile.d"

cp -v * "${BUILD_DIR}/.profile.d/" | indent

cd ${WORKING_DIR}

status "Added image optimizer versions"
cd "${WORKING_DIR}"

echo "advpng: $(advpng --version | head -1)" | indent
echo "gifsicle: $(gifsicle --version | head -1)" | indent
echo "jpegoptim: $(jpegoptim --version | head -1)" | indent
echo "jpegtran: $(jpegtran -V /dev/null 2>&1 | head -1)" | indent
echo "optipng: $(optipng --version | head -1)" | indent
echo "pngcrush: $(pngcrush -version)" | indent
echo "pngquant: $(pngquant --version)" | indent
status "Showing image optimizer versions"

echo "advpng: $(/tmp/codon/vendor/bin/advpng --version | head -1)" | indent
echo "advpng: $(/tmp/codon/vendor/bin/advpng --version | head -1)" | indent
echo "gifsicle: $(/tmp/codon/vendor/bin/gifsicle --version | head -1)" | indent
echo "jpegoptim: $(/tmp/codon/vendor/bin/jpegoptim --version | head -1)" | indent
echo "jpegtran: $(/tmp/codon/vendor/bin/jpegtran -V /dev/null 2>&1 | head -1)" | indent
echo "optipng: $(/tmp/codon/vendor/bin/optipng --version | head -1)" | indent
echo "pngcrush: $(/tmp/codon/vendor/bin/pngcrush -version)" | indent
echo "pngquant: $(/tmp/codon/vendor/bin/pngquant --version)" | indent
echo "cwebp: $(/tmp/codon/vendor/bin/cwebp -version)" | indent
echo "dwebp: $(/tmp/codon/vendor/bin/dwebp -version)" | indent
Binary file removed vendor/optimizers/heroku-16/advpng
Binary file not shown.
Binary file removed vendor/optimizers/heroku-16/gifsicle
Binary file not shown.
Binary file removed vendor/optimizers/heroku-16/jpegoptim
Binary file not shown.
Binary file removed vendor/optimizers/heroku-16/jpegtran
Binary file not shown.
Binary file removed vendor/optimizers/heroku-16/optipng
Binary file not shown.
Binary file removed vendor/optimizers/heroku-16/pngcrush
Binary file not shown.
Binary file removed vendor/optimizers/heroku-16/pngquant
Binary file not shown.
Binary file removed vendor/optimizers/heroku-18/advpng
Binary file not shown.
Binary file removed vendor/optimizers/heroku-18/gifsicle
Binary file not shown.
Binary file removed vendor/optimizers/heroku-18/jpegoptim
Binary file not shown.
Binary file removed vendor/optimizers/heroku-18/jpegtran
Binary file not shown.
Binary file removed vendor/optimizers/heroku-18/optipng
Binary file not shown.
Binary file removed vendor/optimizers/heroku-18/pngcrush
Binary file not shown.
Binary file removed vendor/optimizers/heroku-18/pngquant
Binary file not shown.
Binary file added vendor/optimizers/heroku-20/cwebp
Binary file not shown.
Binary file added vendor/optimizers/heroku-20/dwebp
Binary file not shown.
Binary file added vendor/optimizers/heroku-22/cwebp
Binary file not shown.
Binary file added vendor/optimizers/heroku-22/dwebp
Binary file not shown.
Binary file added vendor/webp/.DS_Store
Binary file not shown.

0 comments on commit 4ccee9b

Please sign in to comment.