ci: include extra protections against tags in other branches

This commit is contained in:
Ben Moore
2020-04-06 09:52:16 -05:00
parent 000eee84fa
commit 0933a3007d
+15 -8
View File
@@ -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
@@ -127,7 +127,6 @@ workflows:
- deploy_svn_branch:
context: genesis-svn
requires:
- checkout
- checks
filters:
branches:
@@ -140,7 +139,7 @@ workflows:
tags:
only: /^\d+\.\d+\.\d+$/
branches:
only: master
ignore: /.*/
- checks:
requires:
- checkout
@@ -148,14 +147,22 @@ workflows:
tags:
only: /^\d+\.\d+\.\d+$/
branches:
only: master
- deploy_svn_tag:
context: genesis-svn
ignore: /.*/
- hold:
type: approval
requires:
- checkout
- checks
filters:
tags:
only: /^\d+\.\d+\.\d+$/
branches:
only: master
ignore: /.*/
- deploy_svn_tag:
context: genesis-svn
requires:
- hold
filters:
tags:
only: /^\d+\.\d+\.\d+$/
branches:
ignore: /.*/