You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 10, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+28-24Lines changed: 28 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,37 +2,41 @@
2
2
3
3
Deploys a WordPress plugin from a local Git repo to the WordPress Plugin Repostiory (SVN).
4
4
5
+
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.
6
+
5
7
## Steps
6
8
7
9
These are the steps that the script takes:
8
10
9
-
1. Asks for plugin slug.
10
-
2. Asks for local plugin directory.
11
-
3. Checks local plugin directory exists.
12
-
4. Asks for main plugin file name.
13
-
5. Checks main plugin file exists.
14
-
6. Checks `readme.txt` version matches main plugin file version.
15
-
7. Asks for temporary SVN checkout path.
16
-
8. Asks for remote SVN repo URL.
17
-
9. Asks for SVN username.
18
-
10. Asks if input is correct, and gives chance to abort.
19
-
11. Checks if Git tag exists for version number (must match exactly).
20
-
12. Does checkout of SVN repo.
21
-
13. Sets SVN ignore on some GitHub-related files.
22
-
14. Exports `HEAD` of `master` from Git to the trunk of SVN.
23
-
15. Initialises and updates any git submodules.
24
-
16. Moves `/trunk/assets` up to `/assets`.
25
-
17. Moves into `/trunk`, and does an SVN commit.
26
-
18. Moves into `/assets`, and does an SVN commit.
27
-
19. Copies `/trunk` into `/tags/{version}`, and does an SVN commit.
28
-
20. Deletes temporary local SVN checkout.
11
+
1. Asks for plugin slug.
12
+
1. Asks for local plugin directory.
13
+
1. Checks local plugin directory exists.
14
+
1. Asks for local SVN assets directory.
15
+
1. Checks local SVN assets directory exists.
16
+
1. Asks for main plugin file name.
17
+
1. Checks main plugin file exists.
18
+
1. Checks `readme.txt` version matches main plugin file version.
19
+
1. Asks for temporary SVN checkout path.
20
+
1. Asks for remote SVN repo URL.
21
+
1. Asks for SVN username.
22
+
1. Asks if input is correct, and gives chance to abort.
23
+
1. Checks if Git tag exists for version number (must match exactly).
24
+
1. Does checkout of SVN repo.
25
+
1. Sets SVN ignore on some GitHub-related files.
26
+
1. Exports `HEAD` of `master` from Git to the trunk of SVN.
27
+
1. Initialises and updates any git submodules.
28
+
1. Moves `/trunk/.wordpress-org` up to SVN `/assets`.
29
+
1. Moves into `/trunk`, and does an SVN commit.
30
+
1. Moves into `/assets`, and does an SVN commit.
31
+
1. Copies `/trunk` into `/tags/{version}`, and does an SVN commit.
32
+
1. Deletes temporary local SVN checkout.
29
33
30
34
## Install
31
35
32
-
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.
33
-
2. Ensure that the shell script is executable. In Mac / Unix, run `chmod +x deploy.sh`.
34
-
3. Run the script with `sh deploy.sh`. You can also double-click it in Finder / Explorer to start it.
35
-
4. You'll now be guided through a set of questions.
36
+
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.
37
+
2. Ensure that the shell script is executable. In Mac / Unix, run `chmod +x deploy.sh`.
38
+
3. Run the script with `sh deploy.sh`. You can also double-click it in Finder / Explorer to start it.
39
+
4. You'll now be guided through a set of questions.
36
40
37
41
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.
0 commit comments