Using subversion is just easy. Most Get Confused to Use Subversion From Command Line. Here is How to Use Subversion From CLI For WordPress Plugin First Release or Update. We have other subversion related guides which you may need later – Git with Subversion for WordPress Plugin Development, A lightweight subversion repository browser, installing subversion on own server. If you are new users, we recommend not to make it complicated with git.
Intended Audience of How to Use Subversion From CLI For WordPress Plugin Guide
WordPress Plugin and Theme Developers, WordPress Core developers, others who may use subversion. We are assuming that the person is slightly used with git. Git is not exactly easy over subversion. There is no reason to fear subversion. Here is big guide on subversion for reading later :
1 | http://svnbook.red-bean.com/nightly/en/index.html |
What we will tell you is enough for normal works. We are using OS X, the guide will work for GNU/Linux. Microsoft Windows users may use cygwin or use GUI tool named Tortoise SVN.
---
Steps of How to Use Subversion From CLI For WordPress Plugin Guide
This is our Plugin :
https://wordpress.org/plugins/ftp-to-zip/
When you’ll first get accepted to publish Plugin on WordPress repository, you’ll also get a set or URLs. Our corresponding SVN URL of WordPress is :
https://plugins.svn.wordpress.org/ftp-to-zip/
I am at $HOME
on my MacBook Pro, you can use any own directory or location :
1 | cd ~ |
It does not matter whether you are pushing for the first time or updating. We made the guide that will work for both. First I need to clone it :
1 | svn co https://plugins.svn.wordpress.org/ftp-to-zip/ |
I received this response :
1 2 3 4 5 6 7 8 9 | Error validating server certificate for 'https://plugins.svn.wordpress.org:443': - The certificate is not issued by a trusted authority. Use the fingerprint to validate the certificate manually! Certificate information: - Hostname: *.svn.wordpress.org - Valid: from Fri, 12 Jun 2015 17:44:41 GMT until Sun, 15 Jul 2018 19:04:26 GMT - Issuer: http://certs.godaddy.com/repository/, GoDaddy.com, Inc., Scottsdale, Arizona, US - Fingerprint: 5c:f0:21:33:a0:f1:f6:37:ac:06:87:c8:62:03:08:d0:32:50:6f:77 (R)eject, accept (t)emporarily or accept (p)ermanently? p |
I pressed P. Then I received this output :
1 2 3 4 5 6 7 8 9 | A ftp-to-zip/assets A ftp-to-zip/assets/banner-772x250.png A ftp-to-zip/branches A ftp-to-zip/tags ... A ftp-to-zip/trunk ... A ftp-to-zip/trunk/screenshot-1.png Checked out revision 1497577. |
I did an ls
and changed directory to that one and ran ls
:
1 2 3 4 5 | ls ftp-to-zip cd ftp-to-zip ls assets branches tags trunk |
If you are publishing the plugin for the first time, you may not have all the directories. What you’ll do is copying the modified files to either trunk or any tag numbered directory. As example, I can cd
to trunk :
1 | cd trunk |
and do whatever here. As I had the directory tags
, I not needed to create it. Else I had to create just a tags directory :
1 | mkdir tags |
Under tag directory, I had to create the first version directory :
1 | mkdir -p tags/1.0 |
As I edited the files on trunk
, I am at trunk directory. I need to copy the files of trunk towards the numbered tag directory :
1 | svn cp * tags/1.9 |
You must use svn cp
instead of only cp
command. If you want to delete something, you have to use this command format :
1 | svn delete --force /path/to/wrong/stuff/ |
For the first time, you need to add all the files :
1 | svn add * |
Otherwise you need not to run the above command. You can optionally run these commands to check :
1 2 | svn stat svn diff |
If your new version is Whenever you’ll run the command with your new version number like 1.0 below :
1 | svn ci -m "tagging version 1.0" |
automatically, this will happen :
1 2 3 4 5 6 7 8 9 | Authentication realm: <https://plugins.svn.wordpress.org:443> Use your WordPress.org login Username: Abhishek_Ghosh Password for 'Abhishek_Ghosh': Adding tags/1.9 Sending tags/1.9/backup.php ... Sending trunk/run.php Transmitting file data ........ Committed revision 1497581. |
Very easy.
Tagged With How to use svn in windows cli , https://plugins svn wordpress org , plugins svn wordpress org:443 , subversion https cli , wordpress org login , XIS9