Skip to content
This repository has been archived by the owner on Mar 6, 2021. It is now read-only.

Commit

Permalink
Enhancement: Require localheinz/composer-normalize only when differen…
Browse files Browse the repository at this point in the history
…t from default
  • Loading branch information
localheinz committed Aug 26, 2019
1 parent 58faaa8 commit 950722e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ For a full diff see [`0.4.2...master`](https://github.com/localheinz/composer-no
### Changed

* Started using `php:7.3-cli-alpine` instead of `php:7.3-alpine` as Docker base image ([#39](https://github.com/localheinz/composer-normalize-action/pull/39)), by [@localheinz](https://github.com/localheinz)
* Requiring `localheinz/composer-normalize` only when value of `COMPOSER_NORMALIZE_VERSION` environment variable is different from initially installed version ([#40](https://github.com/localheinz/composer-normalize-action/pull/40)), by [@localheinz](https://github.com/localheinz)

## [`0.4.2`](https://github.com/localheinz/composer-normalize-action/releases/tag/0.4.2)

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ LABEL "maintainer"="Andreas Möller <[email protected]>"
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

ENV COMPOSER_ALLOW_SUPERUSER=1
ENV COMPOSER_NORMALIZE_VERSION=1.3.0
ENV COMPOSER_NORMALIZE_VERSION_DEFAULT=1.3.0

RUN composer global require localheinz/composer-normalize:$COMPOSER_NORMALIZE_VERSION
RUN composer global require localheinz/composer-normalize:$COMPOSER_NORMALIZE_VERSION_DEFAULT

ADD entrypoint.sh /entrypoint.sh

Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh -l

sh -c "composer global require localheinz/composer-normalize:$COMPOSER_NORMALIZE_VERSION"
sh -c "if [[ ! -z $COMPOSER_NORMALIZE_VERSION && '$COMPOSER_NORMALIZE_VERSION' != '$COMPOSER_NORMALIZE_VERSION_DEFAULT' ]]; then composer global require localheinz/composer-normalize:$COMPOSER_NORMALIZE_VERSION; fi"
sh -c "if [[ '$HOME' != '/root' ]]; then cp -r /root/.composer $HOME/.composer; fi"
sh -c "composer normalize --dry-run"

0 comments on commit 950722e

Please sign in to comment.