File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ function setup_wordpress_files() {
204204 cd " $HTDOCS "
205205 export build_root=" $( pwd) "
206206
207- hosts_wp_version=$( cat " $hosts_file " | shyaml get-value " $GITHUB_BRANCH .WP_VERSION" || true)
207+ hosts_wp_version=$( cat " $hosts_file " | shyaml get-value " $GITHUB_BRANCH .WP_VERSION" 2> /dev/null || true)
208208
209209 # Check if WP_VERSION is already defined in hosts.yml
210210 # Priority: 1. hosts.yml, 2. workflow file, else use latest
@@ -214,6 +214,11 @@ function setup_wordpress_files() {
214214 WP_VERSION=" latest"
215215 fi
216216
217+ # If it is integer, add trailing `.0`
218+ if [[ " $WP_VERSION " =~ ^[+-]? [0-9]+$ ]]; then
219+ WP_VERSION=" $WP_VERSION .0"
220+ fi
221+
217222 if [[ " $WP_MINOR_UPDATE " == " true" ]] && [[ " $WP_VERSION " != " latest" ]]; then
218223 LATEST_MINOR_VERSION=$(
219224 curl -s " https://api.wordpress.org/core/version-check/1.7/?version=$WP_VERSION " |
You can’t perform that action at this time.
0 commit comments