diff --git a/.circleci/config.yml b/.circleci/config.yml index a4f94f1..53e75e2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,7 @@ commands: - run: command: | cd /tmp/artifacts - SLUG=grep 'Text Domain:' /tmp/src/plugin.php | awk -F: '{print $2}' | sed 's/^\s//' + SLUG=$(grep '@package' /tmp/src/plugin.php | awk -F ' ' '{print $3}' | sed 's/^\s//') svn co https://plugins.svn.wordpress.org/$SLUG --depth=empty . svn up trunk svn up tags --depth=empty @@ -40,7 +40,7 @@ commands: - deploy: command: | cd /tmp/artifacts - VERSION=grep 'Version:' /tmp/src/plugin.php | awk -F: '{print $2}' | sed 's/^\s//' + VERSION=$(grep 'Version:' /tmp/src/plugin.php | awk -F: '{print $2}' | sed 's/^\s//') svn cp trunk tags/$VERSION svn_commit: description: "Commit changes to SVN" @@ -48,7 +48,7 @@ commands: - deploy: command: | cd /tmp/artifacts - VERSION=grep 'Version:' /tmp/src/plugin.php | awk -F: '{print $2}' | sed 's/^\s//' + VERSION=$(grep 'Version:' /tmp/src/plugin.php | awk -F: '{print $2}' | sed 's/^\s//') svn ci -m "Tagging $VERSION from Github" --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" executors: @@ -107,10 +107,16 @@ workflows: version: 2 checks: jobs: - - checkout + - checkout: + filters: + branches: + ignore: master - checks: requires: - checkout + filters: + branches: + ignore: master branch_deploy: jobs: @@ -127,7 +133,6 @@ workflows: - deploy_svn_branch: context: genesis-svn requires: - - checkout - checks filters: branches: @@ -140,7 +145,7 @@ workflows: tags: only: /^\d+\.\d+\.\d+$/ branches: - only: master + ignore: /.*/ - checks: requires: - checkout @@ -148,14 +153,13 @@ workflows: tags: only: /^\d+\.\d+\.\d+$/ branches: - only: master + ignore: /.*/ - deploy_svn_tag: context: genesis-svn requires: - - checkout - checks filters: tags: only: /^\d+\.\d+\.\d+$/ branches: - only: master + ignore: /.*/