Skip to content

parse for minor release number#36

Open
jdub233 wants to merge 10 commits intodevelopfrom
latest-minor-release
Open

parse for minor release number#36
jdub233 wants to merge 10 commits intodevelopfrom
latest-minor-release

Conversation

@jdub233
Copy link
Copy Markdown
Contributor

@jdub233 jdub233 commented Aug 4, 2017

No description provided.

Copy link
Copy Markdown
Contributor

@desrosj desrosj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, let's put this in and submit a pull request to https://github.com/wp-cli/scaffold-command and https://github.com/johnbillion/query-monitor/

Comment thread bin/install-wp-tests.sh Outdated
local ARCHIVE_NAME='latest'
elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+ ]]; then
# https serves multiple offers, whereas http serves single.
download https://api.wordpress.org/core/version-check/1.7/ /tmp/wp-latest.json
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix indentation here.

Comment thread bin/install-wp-tests.sh Outdated
LATEST_VERSION=$(grep -o '"version":"'$VERSION_ESCAPED'[^"]*' /tmp/wp-latest.json | sed 's/"version":"//' | head -1)
fi
if [[ -z "$LATEST_VERSION" ]]; then
local ARCHIVE_NAME="wordpress-$WP_VERSION"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation.

Comment thread bin/install-wp-tests.sh Outdated
if [[ -z "$LATEST_VERSION" ]]; then
local ARCHIVE_NAME="wordpress-$WP_VERSION"
else
ARCHIVE_NAME="wordpress-$LATEST_VERSION"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation.

Copy link
Copy Markdown
Contributor

@desrosj desrosj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Awesome! This will be super helpful. 📦 ship it

Comment thread bin/install-wp-tests.sh
if [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+$ ]]; then
WP_TESTS_TAG="branches/$WP_VERSION"
elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then
if [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0] ]]; then
Copy link
Copy Markdown

@atla5 atla5 Oct 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code is duplicated below in install_wp(). it looks like all this section should be doing is deciding whether the WP_TESTS_TAG should use branches/ or tags/.

I would change this code section to the following and put it right at the top. it'll eliminate the need to over-complicate the rest of the logic in the other two functions

  # shorten `1.2.0` to `1.2` 
  if [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0] ]]; then
    $WP_VERSION  = $WP_VERSION%??;
  fi

Copy link
Copy Markdown

@atla5 atla5 Oct 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since the WP_TESTS_TAG variable is only used in the install_test_suite() function, you could also move this section into there, as opposed to leaving it in the main body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants