From 2808889d5ab20b35ebc7a4c84d6f4242547ab499 Mon Sep 17 00:00:00 2001 From: emilleszczak2 Date: Fri, 27 Aug 2021 08:25:30 +0200 Subject: [PATCH] Fix travis ci --- .travis.yml | 1 - scripts/deploy_to_wp_svn.sh | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 446e9a2..864c8f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,6 @@ deploy: tags: true after_deploy: - - cd .. - bash ./scripts/deploy_to_wp_svn.sh script: skip diff --git a/scripts/deploy_to_wp_svn.sh b/scripts/deploy_to_wp_svn.sh index 65f5509..101ab84 100755 --- a/scripts/deploy_to_wp_svn.sh +++ b/scripts/deploy_to_wp_svn.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -x + if [[ -z "$TRAVIS" ]]; then echo "Script is only to be run by Travis CI" 1>&2 exit 1 @@ -29,7 +31,7 @@ if [ $error == 0 ]; then echo "Tag already exists for version $VERSION, aborting deployment" exit 1 fi - + cd "$PLUGIN_BUILDS_PATH" # Clean up any previous svn dir @@ -77,6 +79,8 @@ rm -fR svn-trunk mkdir svn/tags/$VERSION rsync -r -p $PLUGIN/* svn/tags/$VERSION +cd $PLUGIN_BUILDS_PATH + # Add new files to SVN svn stat svn | grep '^?' | awk '{print $2}' | xargs -I x svn add x@ # Remove deleted files from SVN @@ -86,5 +90,5 @@ svn stat svn # Commit to SVN svn ci --no-auth-cache --username $WP_ORG_USERNAME --password $WP_ORG_PASSWORD svn -m "Deploy version $VERSION" -# Remove SVN temp dir + Remove SVN temp dir rm -fR svn \ No newline at end of file