Skip to content

Commit

Permalink
Fix travis ci
Browse files Browse the repository at this point in the history
  • Loading branch information
emilleszczak2 committed Aug 27, 2021
1 parent f84f929 commit 2808889
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ deploy:
tags: true

after_deploy:
- cd ..
- bash ./scripts/deploy_to_wp_svn.sh

script: skip
8 changes: 6 additions & 2 deletions scripts/deploy_to_wp_svn.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

0 comments on commit 2808889

Please sign in to comment.