Skip to content

Commit

Permalink
Check for any PHP version updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
westy92 committed Apr 25, 2024
1 parent 6337fd9 commit d8d59bd
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion php-build.bash
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,20 @@ echo "Pulling $docker_tag" >> output.log 2>&1
# No need to continue building the image if the pull was successful.
if docker pull "$docker_tag" >> output.log 2>&1;
then
exit
# Unless the PHP version has an update...

# Pull latest PHP Docker image so we can check its version
echo "Pulling $base_image" >> output.log 2>&1
docker pull "$base_image" >> output.log 2>&1

# Check PHP version of the latest PHP tag and our tag
base_image_php_version=$(docker run -it "$base_image" php -r "echo PHP_VERSION;")
new_image_php_version=$(docker run -it "$docker_tag" php -r "echo PHP_VERSION;")

if new_image_php_version == base_image_php_version;
then
exit
fi
fi

echo "Building PHP $ACTION_PHP_VERSION with extensions: $ACTION_PHP_EXTENSIONS ..."
Expand Down

0 comments on commit d8d59bd

Please sign in to comment.