Skip to content

Commit f8d8a4f

Browse files
authored
dynamic pint version
1 parent 14b329e commit f8d8a4f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

entrypoint.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
#!/bin/bash
22
set -e
33

4+
pint_install_command=("composer global require laravel/pint:PINT_VERSION --no-progress --dev")
5+
6+
if [[ "${INPUT_PINT_VERSION}" ]]
7+
then
8+
pint_install_command="${pint_install_command/PINT_VERSION/${INPUT_PINT_VERSION}}"
9+
else
10+
pint_install_command="${pint_install_command/:PINT_VERSION/}"
11+
fi
12+
413
command_string=("pint")
514

615
if [[ "${INPUT_TESTMODE}" ]]; then
@@ -19,7 +28,7 @@ if [[ "${INPUT_PRESET}" ]]; then
1928
command_string+=" --preset ${INPUT_PRESET}"
2029
fi
2130

22-
composer global require laravel/pint --no-progress --dev
31+
${pint_install_command[@]}
2332
PATH="/tmp/vendor/bin:${PATH}"
2433

2534
echo "Running Command: " "${command_string[@]}"

0 commit comments

Comments
 (0)