项目作者: butuzov

项目描述 :
WordPress PLugins: Develop @ GitHub and Publish @ http://plugins.svn.wp.org
高级语言: Shell
项目地址: git://github.com/butuzov/wp-plugins-deploy.git
创建时间: 2017-04-19T11:10:07Z
项目社区:https://github.com/butuzov/wp-plugins-deploy

开源协议:GNU General Public License v2.0

下载


Git to SVN for WordPress Plugins or (wp-plugins-deploy)

GitHub All Releases

What this for?

  1. Develop your plugin using Git
  2. Deploy new release to WordPress Plugins Directory (SVN)

Example

  1. # Execution Example Kwywords Description.
  2. #
  3. # -svn=URL Where URL is WP SVN for your Plugin
  4. # -git=URL Where URL is Git Repository URL
  5. # -user=USERNAME Where USERNAME is WP SVN Username (case sensitive)
  6. # -pass=******** WHERE ******** is WP SVN User password.
  7. ./wp-deploy.sh --git=https://github.com/username/plugin-repo \
  8. --svn=http://plugins.svn.wordpress.org/plugin \
  9. --user="${WP_SVN_USER}" --pass="${WP_SVN_PASSWORD}"
  10. # redeploy current git tag
  11. ./wp-deploy.sh --git=https://github.com/username/plugin-repo \
  12. --svn=http://plugins.svn.wordpress.org/plugin \
  13. --user="${WP_SVN_USER}" -pass="${WP_SVN_PASSWORD}" \
  14. --force

Options

  • -git or --git: URL of GIT repository
  • -svn or --svn: URL of SVN repository
  • -u, --u, -user, --user, -username or --username: SVN username.
  • -p, --p, -pass, --pass, -password or --password: SVN username.
  • -f, --force: Force GIT tag redeployment.

A bit longer version of “What this shell script does” ?

  1. Ensure that published version is newer then one in svn. ( It wouldn’t allow you to publish code to repository that has trunk as Stable Tag in your readme.txt of if your readme.txt doesn’t have Stable Tag at all.

  2. Convert your readme.md (or readme.md) and rest of *.md ( or *.markdown files) that found in your GitRepo root to readme.txt (so your repo would not contains extra file you need to edit before release) *

  3. Update Plugin Assets to correct locations. Shell script will search for your assets in root (/), assets and wp-svn-assets and then copy them all to /assets directory of your svn repo. *

    NOTE: I haven’t found a way to make this files or folder as non-exportable and still use it while deploying (deploy script uses a export/archive version of repository).

Why? Inspiration.

This script is done to automate boring CD tasks. Inspired by svn2git-tools by @ocean90.

Features & Todo’s

  • Generation of readme.txt: Allow you to use github style markdown, in order to generate readme.txt
  • Separate Usage of assets (no need to deploy assets to final users if only wordpress plugins directory require it)
  • Forse update of current release.

Troubleshooting.

  1. # Something wrong with your `SVN_USER` its not exists in SVN or misspelled.
  2. # WordPress SVN usernames case sensitive btw
  3. svn: E000000: Commit failed (details follow):
  4. svn: E000000: Access to '/!svn/me' forbidden
  5. # You using wrong password `SVN_PASS`.
  6. svn: E000000: Authentication failed and interactive prompting is disabled; see the --force-interactive option
  7. svn: E000000: Commit failed (details follow):
  8. svn: E000000: No more credentials or we tried too many times.

Example Git repository.

This script used for deployments of Debug Bar Rewrite Rules plugin.

Footnotes