-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
875 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,174 @@ | ||
version: 2.1 | ||
|
||
jobs: | ||
test: | ||
commands: | ||
install_dependencies: | ||
description: "Install development dependencies." | ||
steps: | ||
- run: composer install | ||
|
||
mkdir_artifacts: | ||
description: "Make Artifacts directory" | ||
steps: | ||
- run: | ||
command: | | ||
[ ! -d "/tmp/artifacts" ] && mkdir /tmp/artifacts &>/dev/null | ||
set_verision_variable: | ||
description: "Set the VERSION environment variable" | ||
steps: | ||
- run: | ||
command: | | ||
echo "export VERSION=$(git -C /tmp/src describe --tags --abbrev=0)" >> ${BASH_ENV} | ||
show_pwd_info: | ||
description: "Show information about the current directory" | ||
steps: | ||
- run: pwd | ||
- run: ls -lash | ||
|
||
svn_setup: | ||
description: "Setup SVN" | ||
steps: | ||
- run: echo "export SLUG=$(grep '@package' /tmp/src/plugin.php | awk -F ' ' '{print $3}' | sed 's/^\s//')" >> ${BASH_ENV} | ||
- run: svn co https://plugins.svn.wordpress.org/${SLUG} --depth=empty . | ||
- run: svn up trunk | ||
- run: svn up tags --depth=empty | ||
- run: find ./trunk -not -path "./trunk" -delete | ||
- run: cp -r /tmp/src/. ./trunk | ||
- run: svn propset svn:ignore -F ./trunk/.svnignore ./trunk | ||
|
||
svn_add_changes: | ||
description: "Add changes to SVN" | ||
steps: | ||
- run: | ||
command: if [[ ! -z $(svn st | grep ^\!) ]]; then svn st | grep ^! | awk '{print " --force "$2}' | xargs -0r svn rm; fi | ||
- run: svn add --force . | ||
|
||
svn_create_tag: | ||
description: "Create a SVN tag" | ||
steps: | ||
- set_verision_variable | ||
- run: svn cp trunk tags/${VERSION} | ||
|
||
svn_commit: | ||
description: "Commit changes to SVN" | ||
steps: | ||
- set_verision_variable | ||
- run: svn ci -m "Tagging ${VERSION} from Github" --no-auth-cache --non-interactive --username "${SVN_USERNAME}" --password "${SVN_PASSWORD}" | ||
|
||
executors: | ||
base: | ||
docker: | ||
- image: circleci/buildpack-deps:latest | ||
working_directory: /tmp | ||
php_node: | ||
docker: | ||
- image: circleci/php:7.3.3-stretch-node-browsers | ||
working_directory: /tmp/src | ||
|
||
jobs: | ||
checkout: | ||
executor: base | ||
steps: | ||
- mkdir_artifacts | ||
- checkout: | ||
path: src | ||
- persist_to_workspace: | ||
root: /tmp | ||
paths: | ||
- src | ||
|
||
checks: | ||
executor: php_node | ||
steps: | ||
- checkout | ||
- prepare-environment | ||
- attach_workspace: | ||
at: /tmp | ||
- install_dependencies | ||
- run: composer phpcs | ||
|
||
commands: | ||
prepare-environment: | ||
description: "Install dependencies." | ||
steps: | ||
- run: composer install | ||
deploy_svn_branch: | ||
executor: base | ||
working_directory: /tmp/artifacts | ||
steps: | ||
- attach_workspace: | ||
at: /tmp | ||
- svn_setup | ||
- svn_add_changes | ||
- svn_commit | ||
|
||
deploy_svn_tag: | ||
executor: base | ||
working_directory: /tmp/artifacts | ||
steps: | ||
- attach_workspace: | ||
at: /tmp | ||
- svn_setup | ||
- svn_create_tag | ||
- svn_add_changes | ||
- svn_commit | ||
|
||
workflows: | ||
version: 2 | ||
check-wp-cs: | ||
checks: | ||
jobs: | ||
- checkout: | ||
filters: | ||
branches: | ||
ignore: | ||
- master | ||
- checks: | ||
requires: | ||
- checkout | ||
filters: | ||
branches: | ||
ignore: | ||
- master | ||
|
||
branch_deploy: | ||
jobs: | ||
- checkout: | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- checks: | ||
requires: | ||
- checkout | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- deploy_svn_branch: | ||
context: genesis-svn | ||
requires: | ||
- checks | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
|
||
tag_deploy: | ||
jobs: | ||
- test | ||
- checkout: | ||
filters: | ||
tags: | ||
only: /^\d+\.\d+\.\d+$/ | ||
branches: | ||
ignore: /.*/ | ||
- checks: | ||
requires: | ||
- checkout | ||
filters: | ||
tags: | ||
only: /^\d+\.\d+\.\d+$/ | ||
branches: | ||
ignore: /.*/ | ||
- deploy_svn_tag: | ||
context: genesis-svn | ||
requires: | ||
- checks | ||
filters: | ||
tags: | ||
only: /^\d+\.\d+\.\d+$/ | ||
branches: | ||
ignore: /.*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# This file is for unifying the coding style for different editors and IDEs | ||
# editorconfig.org | ||
|
||
# WordPress Coding Standards | ||
# http://make.wordpress.org/core/handbook/coding-standards/ | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = tab | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.circleci | ||
.git | ||
.gitignore | ||
.gitattributes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "studiopress/genesis-portfolio-pro", | ||
"type": "wordpress-plugin", | ||
"description": "Plugin that add a new Portfolio post type where you can add portfolio entries with images and galleries to show of your visual content.", | ||
"description": "Plugin that add a new Portfolio post type where you can add portfolio entries with images and galleries to show off your visual content.", | ||
"homepage": "https://github.com/studiopress/genesis-portfolio-pro", | ||
"license": "GPL-2.0-or-later", | ||
"require": { | ||
|
@@ -10,10 +10,11 @@ | |
}, | ||
"require-dev": { | ||
"php": "^5.6 || ^7", | ||
"dealerdirect/phpcodesniffer-composer-installer": "*", | ||
"squizlabs/php_codesniffer": "^3.3.1", | ||
"phpcompatibility/phpcompatibility-wp": "*", | ||
"wp-coding-standards/wpcs": "^1" | ||
"dealerdirect/phpcodesniffer-composer-installer": "^0.6.2", | ||
"squizlabs/php_codesniffer": "^3.5", | ||
"phpcompatibility/phpcompatibility-wp": "^2.1", | ||
"wp-coding-standards/wpcs": "^2.2", | ||
"wp-cli/i18n-command": "^2.2" | ||
}, | ||
"config": { | ||
"sort-order": true | ||
|
@@ -23,11 +24,11 @@ | |
"scripts": { | ||
"phpcs": "phpcs --standard=WordPress --ignore=vendor/,node_modules/,assets/ --extensions=php -p ./", | ||
"phpcs-compat": "phpcs --extensions=php --standard=PHPCompatibilityWP --ignore=vendor/,node_modules/,assets/ --runtime-set testVersion 5.6- -p ./", | ||
"phpcbf": "phpcbf --standard=WordPress --ignore=vendor/,node_modules/,assets/ --extensions=php -p ./" | ||
"phpcbf": "phpcbf --standard=WordPress --ignore=vendor/,node_modules/,assets/ --extensions=php -p ./", | ||
"makepot": "wp i18n make-pot . --headers='{ \"Report-Msgid-Bugs-To\": \"StudioPress <[email protected]>\" }' --exclude=vendor/ --quiet" | ||
}, | ||
"support": { | ||
"issues": "https://github.com/studiopress/genesis-portfolio-pro/issues", | ||
"source": "https://github.com/studiopress/genesis-portfolio-pro" | ||
} | ||
} | ||
|
Oops, something went wrong.