• This repository has been archived on 10/May/2023
  • Stars
    star
    304
  • Rank 137,274 (Top 3 %)
  • Language
    Shell
  • License
    Other
  • Created almost 12 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[Deprecated - use the GitHub Action from 10up instead.] Automatically deploy a WordPress plugin from local git repo to the WordPress Plugin Repostiory (SVN).

WordPress Plugin Directory Deployment Script

Deploys a WordPress plugin from a local Git repo to the WordPress Plugin Repostiory (SVN).

Please note that if your repository contains a folder /.wordpress-org it will be used to contain those files that will be transferred to your SVN /assets folder. These assets are the plugin banner images, icons, and any readme.txt related files. If you use a diffent name for this folder you will be prompted for that name in the script.

Steps

These are the steps that the script takes:

  1. Asks for plugin slug.
  2. Asks for local plugin directory.
  3. Checks local plugin directory exists.
  4. Asks for local SVN assets directory.
  5. Checks local SVN assets directory exists.
  6. Asks for main plugin file name.
  7. Checks main plugin file exists.
  8. Checks readme.txt version matches main plugin file version.
  9. Asks for temporary SVN checkout path.
  10. Asks for remote SVN repo URL.
  11. Asks for SVN username.
  12. Asks if input is correct, and gives chance to abort.
  13. Checks if Git tag exists for version number (must match exactly).
  14. Does checkout of SVN repo.
  15. Sets SVN ignore on some GitHub-related files.
  16. Exports HEAD of master from Git to the trunk of SVN.
  17. Initialises and updates any git submodules.
  18. Moves /trunk/.wordpress-org up to SVN /assets.
  19. Moves into /trunk, and does an SVN commit.
  20. Moves into /assets, and does an SVN commit.
  21. Copies /trunk into /tags/{version}, and does an SVN commit.
  22. Deletes temporary local SVN checkout.

Install

  1. In your terminal, cd into the directory which contains subdirectories for each of your plugins. i.e. on a local install of WordPress, this will probably be wp-content/plugins. Then git clone https://github.com/GaryJones/wordpress-plugin-git-flow-svn-deploy.git . to clone the deploy script locally.
  2. Ensure that the shell script is executable. In Mac / Unix, run chmod +x deploy.sh.
  3. Run the script with sh deploy.sh. You can also double-click it in Finder / Explorer to start it.
  4. You'll now be guided through a set of questions.

I prefer to keep this script in the root of my projects directory. Each project directory is named as the plugin slug, as is the corresponding GitHub repo. To use, just call the script, enter the plugin slug, confirm or amend default suggestions, and sit back as the code is sent to SVN and git repos including tags. The commit messages here are hard-coded for consistency.

Extras

You may define your own .svnignore file similar to an svn propset svn:ignore .svnignore command. This will remove any listed files and/or directories from committing to the Plugins Directory.

NB: you must list files separately, no wildcards.

Reference: https://stackoverflow.com/questions/17298668/svn-ignore-like-gitignore

Credits

At one point, well over 90% of this script was written by others:

There has been a significant amount of changes since then though.

License

This package was created at a time when the above credited repositories had no license. For any amendements done since then, the code is licensed under MIT. For the original work, contact the previous authors.

More Repositories

1

Gamajo-Template-Loader

A class to copy into your WordPress plugin, to allow loading template parts with fallback through the child theme > parent theme > plugin.
PHP
280
star
2

plugin-boilerplate

PSR-4 + PHP 7.4 WordPress plugin boilerplate.
PHP
90
star
3

genesis-header-nav

WordPress plugin that registers a menu location and displays it inside the header for a Genesis Framework child theme.
PHP
69
star
4

Simple-PHP-CSS-Minification

A set of regular expressions in PHP to minify a string of CSS.
PHP
37
star
5

move-floating-social-bar-in-genesis

Moves the Floating Social Bar plugin output from just inside the entry content to just before it.
26
star
6

genesis-js-no-js

WordPress plugin for Genesis child themes. Adds a 'no-js' body class to the front-end, and a small inline script that changes it to `js` if JavaScript is enabled. Allows for styling of elements (like potential hiding) if JavaScript is enabled.
PHP
22
star
7

accessible-menu

Making WordPress navigation menus a little more accessible.
JavaScript
20
star
8

Gamajo-Registerable

Register WordPress post types and taxonomies using object-orientated design.
PHP
18
star
9

genesis-child-theme-index

Crowdsourcing an index of all available Genesis child themes.
JavaScript
16
star
10

genesis-jetpack-infinite-scroll

Adds support for JetPack Infinite Scroll to Genesis Framework child themes.
PHP
12
star
11

wp-calendar-core

WordPress plugin, designed to be a replacement for the monstrous get_calendar() with the intention to integrate with core when stable.
PHP
12
star
12

readme-templates

Default README templates for groups of projects
9
star
13

allow-duplicate-slugs

WordPress plugin to allow duplicate slugs across different post types
PHP
8
star
14

EmailAddress

Value Object representing an email address
PHP
8
star
15

diagnosis

WordPress plugin that adds pages to the Dashboard menu with technical details about PHP, MySQL and other server details.
PHP
8
star
16

genesis-single-breadcrumbs

WordPress plugin that adds per-entry options for breadcrumbs when a Genesis child theme is active.
PHP
7
star
17

genesis-simple-sidebars-exporter

WordPress plugin that adds support for exporting settings saved from Genesis Simple Sidebars plugin, via the exporter within the Genesis Framework.
PHP
7
star
18

Core-Library-Plugin-Example

Example of a core library plugin.
PHP
6
star
19

Core-Library-Plugin-Consumer-Example

A standard WordPress plugin that has a dependency on the Core Library Plugin.
PHP
6
star
20

Genesis-Admin-Bar-Plus

Adds resource links related to the Genesis Framework to the WordPress admin bar.
PHP
5
star
21

multi-page-post-next-and-numbers

Display both Previous & Next links and numbers for multi-page posts.
PHP
5
star
22

genesis-disable-adsense-auto-ads

WordPress Plugin: Hides the references to AdSense Auto Ads in Genesis Framework 2.6.0 and above.
PHP
5
star
23

php-type-converter

Converts one resource to another (XML, JSON, Object, Array, Serialization).
PHP
5
star
24

sublime

My Sublime Text 3 User directory
Python
4
star
25

genesis-automatic-term-headline

Plugin for Genesis Framework, that automatically adds a headline to the term archive page, the same as the name of taxonomy term, if no explicit value is given.
PHP
4
star
26

dotfiles

My dotfiles
Shell
3
star
27

Gamajo-Geo-Data

Geo data retrieval library
PHP
3
star
28

PHP-Coding-Standards

Fork of the WP PHP coding standards, to add clarifications and remove ambiguities.
3
star
29

Easy-WSDL2PHP

Modified version of http://sourceforge.net/projects/easywsdl2php/
PHP
2
star
30

Gamajo-Single-Entry-Term-Body-Classes

A class to copy into your WordPress plugin, to make adding taxonomy-term HTML classes to single custom post type entries considerably easier.
PHP
2
star
31

Widget-Plugin-Boilerplate

My boilerplate set up for creating new plugins which add a widget.
PHP
2
star
32

wp-credits

Quick and dirty list from the WordPress Credits API for all credited versions
PHP
2
star
33

visual-subtitle

WordPress plugin. Allows part of a post title to be styled as a subtitle. Classic Editor only.
PHP
2
star
34

grunt-php-analyzer

php-analyzer for grunt
JavaScript
1
star
35

daterange

PHP: Display a range of dates, with consolidated time parts.
PHP
1
star
36

EDD-Content-Restriction

Content Restriction Extension for EDD
PHP
1
star
37

genesis-ignore-deprecated

Stops the Genesis Framework deprecated functions file from loading on every request, giving a small performance benefit
PHP
1
star
38

test-gpg

Just testing GPG verification
1
star
39

calendar-category

WordPress plugin. Un-registers the default Calendar widget, and registers a new one which supports showing only those posts in certain (or all) categories. Can add multiple calendar widgets – each of them set to different categories (or All Categories). The tooltip on the per-day links shows only post titles from that category, and when you click on the calendar link to bring up the day archive of posts, only posts from that category are shown.
PHP
1
star