Skip to content

Commit

Permalink
Merge pull request #411 from 10up/release/2.2.2
Browse files Browse the repository at this point in the history
Release/2.2.2
  • Loading branch information
dkotter authored Feb 5, 2025
2 parents debbd5c + 1412e60 commit a90d1d6
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 14 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file, per [the Ke

## [Unreleased] - TBD

## [2.2.2] - 2025-02-05
### Added
- Add author ID as a new, optional argument to the `srm_create_redirect` function. If passed, will associate this author ID to the newly created redirect (props [@norcross](https://github.com/norcross), [@dkotter](https://github.com/dkotter) via [#408](https://github.com/10up/safe-redirect-manager/pull/408)).

### Fixed
- Fix a few typos (props [@szepeviktor](https://github.com/szepeviktor), [@jeffpaul](https://github.com/jeffpaul) via [#407](https://github.com/10up/safe-redirect-manager/pull/407)).

## [2.2.1] - 2024-11-13
**Note that this version bumps the WordPress minimum from 6.4 to 6.5.**

Expand Down Expand Up @@ -374,6 +381,7 @@ All notable changes to this project will be documented in this file, per [the Ke
- Plugin released

[Unreleased]: https://github.com/10up/safe-redirect-manager/compare/trunk...develop
[2.2.2]: https://github.com/10up/safe-redirect-manager/compare/2.2.1...2.2.2
[2.2.1]: https://github.com/10up/safe-redirect-manager/compare/2.2.0...2.2.1
[2.2.0]: https://github.com/10up/safe-redirect-manager/compare/2.1.2...2.2.0
[2.1.2]: https://github.com/10up/safe-redirect-manager/compare/2.1.1...2.1.2
Expand Down
30 changes: 22 additions & 8 deletions bin/install-wp-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,19 @@ WP_TESTS_DIR=${WP_TESTS_DIR-$TMPDIR/wordpress-tests-lib}
WP_CORE_DIR=${WP_CORE_DIR-$TMPDIR/wordpress/}

download() {
if [ `which curl` ]; then
curl -s "$1" > "$2";
elif [ `which wget` ]; then
wget -nv -O "$2" "$1"
fi
if [ `which curl` ]; then
curl -s "$1" > "$2";
elif [ `which wget` ]; then
wget -nv -O "$2" "$1"
fi
}

# Check if git is installed
check_git_installed() {
if ! command -v git > /dev/null; then
echo "Error: git is not installed. Please install git and try again."
exit 1
fi
}

if [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+$ ]]; then
Expand All @@ -35,6 +43,7 @@ elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then
WP_TESTS_TAG="tags/$WP_VERSION"
fi
elif [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then
WP_BRANCH="trunk"
WP_TESTS_TAG="trunk"
else
# http serves a single offer, whereas https serves multiple. we only want one
Expand All @@ -45,6 +54,7 @@ else
echo "Latest WordPress version could not be found"
exit 1
fi
WP_BRANCH=$LATEST_VERSION
WP_TESTS_TAG="tags/$LATEST_VERSION"
fi

Expand Down Expand Up @@ -104,12 +114,16 @@ install_test_suite() {
if [ ! -d $WP_TESTS_DIR ]; then
# set up testing suite
mkdir -p $WP_TESTS_DIR
svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes
svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/data/ $WP_TESTS_DIR/data
check_git_installed
git clone --depth 1 --branch $WP_BRANCH https://github.com/wordpress/wordpress-develop $TMPDIR/wordpress-develop
rm -r $TMPDIR/wordpress-develop/.git
mv $TMPDIR/wordpress-develop/tests/phpunit/includes/ $WP_TESTS_DIR/includes
mv $TMPDIR/wordpress-develop/tests/phpunit/data/ $WP_TESTS_DIR/data
rm -r $TMPDIR/wordpress-develop
fi

if [ ! -f wp-tests-config.php ]; then
download https://develop.svn.wordpress.org/${WP_TESTS_TAG}/wp-tests-config-sample.php "$WP_TESTS_DIR"/wp-tests-config.php
download https://raw.githubusercontent.com/wordpress/wordpress-develop/${WP_BRANCH}/wp-tests-config-sample.php "$WP_TESTS_DIR"/wp-tests-config.php
# remove all forward slashes in the end
WP_CORE_DIR=$(echo $WP_CORE_DIR | sed "s:/\+$::")
sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR/':" "$WP_TESTS_DIR"/wp-tests-config.php
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "safe-redirect-manager",
"version": "2.2.1",
"version": "2.2.2",
"description": "Safely manage your website's HTTP redirects.",
"homepage": "https://github.com/10up/safe-redirect-manager",
"bugs": {
Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: 10up, tlovett1, tollmanz, taylorde, jakemgold, danielbachhuber, jeffpaul
Tags: http redirects, redirect manager, url redirection, safe http redirection, multisite redirects
Tested up to: 6.7
Stable tag: 2.2.1
Stable tag: 2.2.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -63,6 +63,11 @@ Safe Redirect Manager includes a number of actions and filters developers can ma

== Changelog ==

= 2.2.2 - 2025-02-05 =

* **Added:** Add author ID as a new, optional argument to the `srm_create_redirect` function. If passed, will associate this author ID to the newly created redirect (props [@norcross](https://github.com/norcross), [@dkotter](https://github.com/dkotter) via [#408](https://github.com/10up/safe-redirect-manager/pull/408)).
* **Fixed:** Fix a few typos (props [@szepeviktor](https://github.com/szepeviktor), [@jeffpaul](https://github.com/jeffpaul) via [#407](https://github.com/10up/safe-redirect-manager/pull/407)).

= 2.2.1 - 2024-11-13 =

* **Changed:** Bump WordPress "tested up to" version 6.7 (props [@sudip-md](https://github.com/sudip-md), [@jeffpaul](https://github.com/jeffpaul), [@mehidi258](https://github.com/mehidi258) via [#403](https://github.com/10up/safe-redirect-manager/pull/403)).
Expand Down
4 changes: 2 additions & 2 deletions safe-redirect-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Safe Redirect Manager
* Plugin URI: https://wordpress.org/plugins/safe-redirect-manager
* Description: Easily and safely manage HTTP redirects.
* Version: 2.2.1
* Version: 2.2.2
* Requires at least: 6.5
* Requires PHP: 7.4
* Author: 10up
Expand Down Expand Up @@ -70,7 +70,7 @@ function() {
require_once dirname( __FILE__ ) . '/inc/classes/class-srm-redirect.php';
require_once dirname( __FILE__ ) . '/inc/classes/class-srm-loop-detection.php';

define( 'SRM_VERSION', '2.2.1' );
define( 'SRM_VERSION', '2.2.2' );
define( 'SRM_PLUGIN_FULL_FILE', __FILE__ );
define( 'SRM_PLUGIN_URL', plugin_dir_url( SRM_PLUGIN_FULL_FILE ) );

Expand Down

0 comments on commit a90d1d6

Please sign in to comment.