@@ -28,10 +28,10 @@ download() {
28
28
fi
29
29
}
30
30
31
- # Check if svn is installed
32
- check_svn_installed () {
33
- if ! command -v svn > /dev/null; then
34
- echo " Error: svn is not installed. Please install svn and try again."
31
+ # Check if git is installed
32
+ check_git_installed () {
33
+ if ! command -v git > /dev/null; then
34
+ echo " Error: git is not installed. Please install git and try again."
35
35
exit 1
36
36
fi
37
37
}
@@ -50,6 +50,7 @@ elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then
50
50
WP_TESTS_TAG=" tags/$WP_VERSION "
51
51
fi
52
52
elif [[ $WP_VERSION == ' nightly' || $WP_VERSION == ' trunk' ]]; then
53
+ WP_BRANCH=" trunk"
53
54
WP_TESTS_TAG=" trunk"
54
55
else
55
56
# http serves a single offer, whereas https serves multiple. we only want one
60
61
echo " Latest WordPress version could not be found"
61
62
exit 1
62
63
fi
64
+ WP_BRANCH=$LATEST_VERSION
63
65
WP_TESTS_TAG=" tags/$LATEST_VERSION "
64
66
fi
65
67
set -ex
@@ -75,8 +77,9 @@ install_wp() {
75
77
if [[ $WP_VERSION == ' nightly' || $WP_VERSION == ' trunk' ]]; then
76
78
mkdir -p $TMPDIR /wordpress-trunk
77
79
rm -rf $TMPDIR /wordpress-trunk/*
78
- check_svn_installed
79
- svn export --quiet https://core.svn.wordpress.org/trunk $TMPDIR /wordpress-trunk/wordpress
80
+ check_git_installed
81
+ git clone --depth 1 --branch master https://github.com/wordpress/wordpress $TMPDIR /wordpress-trunk/wordpress
82
+ rm -r $TMPDIR /wordpress-trunk/wordpress/.git
80
83
mv $TMPDIR /wordpress-trunk/wordpress/* $WP_CORE_DIR
81
84
else
82
85
if [ $WP_VERSION == ' latest' ]; then
@@ -120,13 +123,16 @@ install_test_suite() {
120
123
# set up testing suite
121
124
mkdir -p $WP_TESTS_DIR
122
125
rm -rf $WP_TESTS_DIR /{includes,data}
123
- check_svn_installed
124
- svn export --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG} /tests/phpunit/includes/ $WP_TESTS_DIR /includes
125
- svn export --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG} /tests/phpunit/data/ $WP_TESTS_DIR /data
126
+ check_git_installed
127
+ git clone --depth 1 --branch $WP_BRANCH https://github.com/wordpress/wordpress-develop $TMPDIR /wordpress-develop
128
+ rm -r $TMPDIR /wordpress-develop/.git
129
+ mv $TMPDIR /wordpress-develop/tests/phpunit/includes/ $WP_TESTS_DIR /includes
130
+ mv $TMPDIR /wordpress-develop/tests/phpunit/data/ $WP_TESTS_DIR /data
131
+ rm -r $TMPDIR /wordpress-develop
126
132
fi
127
133
128
134
if [ ! -f wp-tests-config.php ]; then
129
- download https://develop.svn. wordpress.org/ ${WP_TESTS_TAG } /wp-tests-config-sample.php " $WP_TESTS_DIR " /wp-tests-config.php
135
+ download https://raw.githubusercontent.com/ wordpress/wordpress-develop/ ${WP_BRANCH } /wp-tests-config-sample.php " $WP_TESTS_DIR " /wp-tests-config.php
130
136
# remove all forward slashes in the end
131
137
WP_CORE_DIR=$( echo $WP_CORE_DIR | sed " s:/\+$::" )
132
138
sed $ioption " s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR /':" " $WP_TESTS_DIR " /wp-tests-config.php
0 commit comments