-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from aglipanci/version-based-pint
Adding option to configure Pint version used.
- Loading branch information
Showing
3 changed files
with
28 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
FROM composer:latest | ||
|
||
RUN composer global require laravel/pint --no-progress --dev | ||
ENV PATH="/tmp/vendor/bin:${PATH}" | ||
|
||
COPY "entrypoint.sh" "/entrypoint.sh" | ||
RUN chmod +x /entrypoint.sh | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,38 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
command_string=("pint") | ||
pint_install_command=("composer global require laravel/pint:PINT_VERSION --no-progress --dev") | ||
|
||
if [[ "${INPUT_PINTVERSION}" ]] | ||
then | ||
pint_install_command="${pint_install_command/PINT_VERSION/${INPUT_PINTVERSION}}" | ||
else | ||
pint_install_command="${pint_install_command/:PINT_VERSION/}" | ||
fi | ||
|
||
pint_command=("pint") | ||
|
||
if [[ "${INPUT_TESTMODE}" ]]; then | ||
command_string+=" --test" | ||
pint_command+=" --test" | ||
fi | ||
|
||
if [[ "${INPUT_VERBOSEMODE}" ]]; then | ||
command_string+=" -v" | ||
pint_command+=" -v" | ||
fi | ||
|
||
if [[ "${INPUT_CONFIGPATH}" ]]; then | ||
command_string+=" --config ${INPUT_CONFIGPATH}" | ||
pint_command+=" --config ${INPUT_CONFIGPATH}" | ||
fi | ||
|
||
if [[ "${INPUT_PRESET}" ]]; then | ||
command_string+=" --preset ${INPUT_PRESET}" | ||
pint_command+=" --preset ${INPUT_PRESET}" | ||
fi | ||
|
||
echo "Running Command: " "${command_string[@]}" | ||
echo "Running Command: " "${pint_install_command[@]}" | ||
|
||
${pint_install_command[@]} | ||
PATH="/tmp/vendor/bin:${PATH}" | ||
|
||
echo "Running Command: " "${pint_command[@]}" | ||
|
||
${command_string[@]} | ||
${pint_command[@]} |