Commit 4bb870b5 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Allow the WP_CLI tool to find the latest WP version

parent 337c843e
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
#!/bin/bash

get_latest() {
	wget -O- 'http://api.wordpress.org/core/version-check/1.7/' |
		sed -r 's/^.*"current":"([^"]+)".*$/\1/'
}
get_latest() { :; }

get_version() {
	docker run --rm $1 wp core version
@@ -20,7 +17,7 @@ build() {
	docker_push ${DOCKER_REPOSITORY}/compile:latest

	docker_build \
		--build-arg wp_version="${UPSTREAM_VERSION}" \
		${UPSTREAM_VERSION:+--build-arg wp_version="${UPSTREAM_VERSION}"} \
		--tag $1

		# --build-arg base_image="${WORDPRESS_BASE_IMAGE:-php:7.3-fpm}" \