Skip to content

Commit

Permalink
Merge pull request #3 from assertwell/release/v0.2.0
Browse files Browse the repository at this point in the history
Version 0.2.0
  • Loading branch information
stevegrunwell authored Oct 26, 2020
2 parents 15c999b + 3bf6484 commit 405676b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,27 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.2.0] — 2020-10-26

### Updated

* Refresh the install script from the WP-CLI upstream, based on [11de967b](https://github.com/wp-cli/scaffold-command/commit/11de967b2f46f8fc383d6c360832234b87143edf) ([#2], props [@szepeviktor](https://github.com/szepeviktor))


## [v0.1.1] — 2020-03-26

### Fixed

* Manually apply the patch from https://github.com/wp-cli/scaffold-command/pull/255 ahead of official merger.


## [v0.1.0] — 2020-02-26

Initial public release of the library, with `bin/install-wp-tests.sh` based on [9b7fd85](https://github.com/wp-cli/scaffold-command/blob/9b7fd851b7696e54ee1be49b0709a6562dc510c9/templates/install-wp-tests.sh).


[Unreleased]: https://github.com/assertwell/wp-core-test-framework/compare/master...develop
[v0.1.0]: https://github.com/assertwell/wp-core-test-framework/releases/tag/v0.1.0
[v0.1.1]: https://github.com/assertwell/wp-core-test-framework/releases/tag/v0.1.1
[v0.2.0]: https://github.com/assertwell/wp-core-test-framework/releases/tag/v0.2.0
[#2]: https://github.com/assertwell/wp-core-test-framework/pull/2
16 changes: 7 additions & 9 deletions bin/install-wp-tests.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SKIP_DB_CREATE=${6-false}
TMPDIR=${TMPDIR-/tmp}
TMPDIR=$(echo $TMPDIR | sed -e "s/\/$//")
WP_TESTS_DIR=${WP_TESTS_DIR-$TMPDIR/wordpress-tests-lib}
WP_CORE_DIR=${WP_CORE_DIR-$TMPDIR/wordpress/}
WP_CORE_DIR=${WP_CORE_DIR-$TMPDIR/wordpress}

download() {
if [ `which curl` ]; then
Expand Down Expand Up @@ -64,10 +64,9 @@ install_wp() {
mkdir -p $WP_CORE_DIR

if [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then
mkdir -p $TMPDIR/wordpress-nightly
download https://wordpress.org/nightly-builds/wordpress-latest.zip $TMPDIR/wordpress-nightly/wordpress-nightly.zip
unzip -q $TMPDIR/wordpress-nightly/wordpress-nightly.zip -d $TMPDIR/wordpress-nightly/
mv $TMPDIR/wordpress-nightly/wordpress/* $WP_CORE_DIR
mkdir -p $TMPDIR/wordpress-trunk
svn export --quiet https://core.svn.wordpress.org/trunk $TMPDIR/wordpress-trunk/wordpress
mv $TMPDIR/wordpress-trunk/wordpress/* $WP_CORE_DIR
else
if [ $WP_VERSION == 'latest' ]; then
local ARCHIVE_NAME='latest'
Expand Down Expand Up @@ -109,8 +108,8 @@ install_test_suite() {
if [ ! -d $WP_TESTS_DIR ]; then
# set up testing suite
mkdir -p $WP_TESTS_DIR
svn co --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes
svn co --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/data/ $WP_TESTS_DIR/data
svn export --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes
svn export --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/data/ $WP_TESTS_DIR/data
fi

if [ ! -f wp-tests-config.php ]; then
Expand Down Expand Up @@ -167,8 +166,7 @@ install_db() {
fi

# create database
# Overwritten to incorporate https://github.com/wp-cli/scaffold-command/pull/255.
if [ $(mysql --user="$DB_USER" --password="$DB_PASS" --execute='show databases;' | grep ^$DB_NAME$) ]
if [ $(mysql --user="$DB_USER" --password="$DB_PASS"$EXTRA --execute='show databases;' | grep ^$DB_NAME$) ]
then
echo "Reinstalling will delete the existing test database ($DB_NAME)"
read -p 'Are you sure you want to proceed? [y/N]: ' DELETE_EXISTING_DB
Expand Down
2 changes: 1 addition & 1 deletion bin/refresh-wp-install-tests.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ DIR="$( cd "$(dirname "$0")" || exit 1; pwd -P )"
curl -s "$SRC" \
| sed $'2i\\\n# Notice: This file is pulled from the WP-CLI scaffold command,\\\n# and should not be modified directly.\n' \
> "$DIR/install-wp-tests.sh" \
&& echo "\033[0;32mbin/install-wp-tests.sh has been updated to match ${SRC}\033[0;0m"
&& echo -e "\033[0;32mbin/install-wp-tests.sh has been updated to match ${SRC}\033[0;0m"

0 comments on commit 405676b

Please sign in to comment.