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

Enhancement: Require localheinz/composer-normalize only when different from default #40

Merged
merged 1 commit into from
Aug 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"