We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3733951 commit 1aaa8c2Copy full SHA for 1aaa8c2
main.sh
@@ -166,7 +166,15 @@ function setup_wordpress_files() {
166
cd "$HTDOCS"
167
export build_root="$(pwd)"
168
169
- WP_VERSION=${WP_VERSION:-"latest"}
+ hosts_wp_version=$(cat $hosts_file | shyaml get-value "$GITHUB_BRANCH.WP_VERSION" 2> /dev/null)
170
+
171
+ # Check if WP_VERSION is already defined in hosts.yml
172
+ # Priority: 1. hosts.yml, 2. workflow file, else use latest
173
+ if [[ -n $hosts_wp_version ]]; then
174
+ WP_VERSION="$hosts_wp_version"
175
+ elif [[ -z $WP_VERSION ]]; then
176
+ WP_VERSION="latest"
177
+ fi
178
179
if [[ "$WP_MINOR_UPDATE" == "true" ]] && [[ "$WP_VERSION" != "latest" ]]; then
180
LATEST_MINOR_VERSION=$(\
0 commit comments