File tree Expand file tree Collapse file tree 4 files changed +31
-0
lines changed
Expand file tree Collapse file tree 4 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1919 steps :
2020 - name : Checkout
2121 uses : actions/checkout@v4
22+ - name : Install SVN
23+ run : |
24+ if ! command -v svn > /dev/null; then
25+ sudo apt-get update
26+ sudo apt-get install -y subversion
27+ fi
2228 - name : Setup PHP
2329 uses : shivammathur/setup-php@v2
2430 with :
Original file line number Diff line number Diff line change 1010 steps :
1111 - name : Checkout
1212 uses : actions/checkout@v4
13+ - name : Install SVN
14+ run : |
15+ if ! command -v svn > /dev/null; then
16+ sudo apt-get update
17+ sudo apt-get install -y subversion
18+ fi
1319 - name : Setup PHP
1420 uses : shivammathur/setup-php@v2
1521 with :
Original file line number Diff line number Diff line change 1111 steps :
1212 - name : Checkout
1313 uses : actions/checkout@v4
14+ - name : Install SVN
15+ run : |
16+ if ! command -v svn > /dev/null; then
17+ sudo apt-get update
18+ sudo apt-get install -y subversion
19+ fi
1420 - name : Setup PHP
1521 uses : shivammathur/setup-php@v2
1622 with :
Original file line number Diff line number Diff line change @@ -22,6 +22,17 @@ download() {
2222 curl -s " $1 " > " $2 " ;
2323 elif [ ` which wget` ]; then
2424 wget -nv -O " $2 " " $1 "
25+ else
26+ echo " Error: Neither curl nor wget is installed."
27+ exit 1
28+ fi
29+ }
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."
35+ exit 1
2536 fi
2637}
2738
@@ -64,6 +75,7 @@ install_wp() {
6475 if [[ $WP_VERSION == ' nightly' || $WP_VERSION == ' trunk' ]]; then
6576 mkdir -p $TMPDIR /wordpress-trunk
6677 rm -rf $TMPDIR /wordpress-trunk/*
78+ check_svn_installed
6779 svn export --quiet https://core.svn.wordpress.org/trunk $TMPDIR /wordpress-trunk/wordpress
6880 mv $TMPDIR /wordpress-trunk/wordpress/* $WP_CORE_DIR
6981 else
@@ -108,6 +120,7 @@ install_test_suite() {
108120 # set up testing suite
109121 mkdir -p $WP_TESTS_DIR
110122 rm -rf $WP_TESTS_DIR /{includes,data}
123+ check_svn_installed
111124 svn export --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG} /tests/phpunit/includes/ $WP_TESTS_DIR /includes
112125 svn export --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG} /tests/phpunit/data/ $WP_TESTS_DIR /data
113126 fi
You can’t perform that action at this time.
0 commit comments