Skip to content

Commit

Permalink
Merge pull request #195 from wp-cli/fix/lock-version-for-sqlite-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
schlessera authored Dec 18, 2023
2 parents 3f903dc + ad7ef50 commit ad0017b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/install-package-tests
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if [ -n "${WP_CLI_TEST_DBHOST}" ]; then
if [ -n "${PORT}" ]; then
# If the port is not numeric, then we assume it is a socket path.
if is_numeric "${PORT}"; then
HOST_STRING="${HOST_STRING} --port${PORT} --protocol=tcp"
HOST_STRING="${HOST_STRING} --port=${PORT} --protocol=tcp"
else
HOST_STRING="${HOST_STRING} --socket=${PORT} --protocol=socket"
fi
Expand Down
9 changes: 8 additions & 1 deletion src/Context/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ private static function get_behat_internal_variables() {
* for use in subsequent WordPress copies
*/
private static function download_sqlite_plugin( $dir ) {
$download_url = 'https://downloads.wordpress.org/plugin/sqlite-database-integration.zip';
$download_url = 'https://github.com/WordPress/sqlite-database-integration/archive/refs/tags/v2.1.3.zip';
$download_location = $dir . '/sqlite-database-integration.zip';

if ( ! is_dir( $dir ) ) {
Expand Down Expand Up @@ -364,6 +364,13 @@ private static function download_sqlite_plugin( $dir ) {
$error_message = $zip->getStatusString();
throw new RuntimeException( sprintf( 'Failed to open the zip file: %s', $error_message ) );
}

// For the release downloaded from GitHub, the unzipped folder will contain the version number.
// We're renaming the folder here for consistency's sake.
rename(
$dir . '/sqlite-database-integration-2.1.3/',
$dir . '/sqlite-database-integration/'
);
}

/**
Expand Down

0 comments on commit ad0017b

Please sign in to comment.