DEV Community

dottxado
dottxado

Posted on • Updated on

Manage your WordPress plugin without knowing SVN

My Workflow

Despite I started my web developer career using SVN, I changed job in 2 years and moved from SVN to git without returning back. I use daily git, both with a GUI and on the cli, but SVN...well, I have to use it only when I want to release the plugins that I have published on the WordPress repository (...so rarely!).
So, when I finally have will&time to work on my plugins, I also have to remember how to manage the SVN repository, what cli commands use, where I parked the SVN managed code, and usually I have to install it because in the mean time I have played with my OS.

I know, I know...you can say "SVN is easy", "The commands you need to remember are just 2", "You are complaining too much".
No, my answer is: I want a smarter way to manage my SVN repositories.

After the last OS change, I finally decided that came the time to find this smarter way and found a lot of GitHub Actions that I can use to deploy my plugin on the SVN repository starting from the GitHub repository...Fantastic, in this way I don't need to install SVN locally and host the repository to commit new versions to it, but we are missing a step for the final smart solution.

As a background information, you need to know that the WordPress SVN repository is meant to be a release repository, not a versioning repository, so you are warmly invited to remove the old tags and maintain inside the SVN only the current release.

The actions that I found only commit to SVN the new tag, but don't manage the removal of the old tags, leaving this step to be done locally, hosting the repository and committing the deletion of the old tags.

Here I introduce you the final housekeeping step for your SVN repository, my GitHub Action "WordPress SVN tag cleaner".

I can finally manage my plugins without ever knowing what is SVN!

Submission Category:

Maintainer Must-Haves

Yaml File or Link to Code

You can already find an example workflow in the readme of the Action.

GitHub logo dottxado / action-wordpress-svn-tag-cleaner

Take care of your plugin SVN repository cleaning the old tags with this GitHub Action

WordPress SVN tag cleaner

This GitHub Action deletes a specified folder tag from your WordPress SVN plugin repository.

Configuration

Required secrets

  • SVN_USERNAME
  • SVN_PASSWORD

Set these secrets in the repository settings.

Required inputs

  • Tag to remove (tag-to-remove): please require this input in your workflow

Optional environment variables

  • SLUG: the WordPress repository slug. It defaults to the GitHub repository name

Example workflow

This example demonstrate a simple manual workflow

name: Remove old tags from SVN
on:
  workflow_dispatch:
    inputs:
      tag-to-remove:
        description: 'Tag to remove'
        required: true
jobs:
  remove-tag:
    runs-on: ubuntu-latest
    name: Remove the tag
    steps:
      - uses: dottxado/action-wordpress-svn-tag-cleaner@1.0.0
        with:
          tag-to-remove: ${{ github.event.inputs.tag-to-remove }}
        env:
          SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
          SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
Enter fullscreen mode Exit fullscreen mode





The action is not automatic on git hooks but requires as input the tag to remove.

Additional Resources / Info

I use this workflow on my WooCommerce plugin, check it out here!

GitHub logo dottxado / email-fields-for-woocommerce

WordPress plugin to add or modify the Reply-to and Bcc addresses on WooCommerce emails.

Email Fields For WooCommerce

Add or modify the Reply-to and Bcc addresses on WooCommerce emails.

Description

This plugin can be used to globally modify the Reply-to and/or Bcc addresses used by WooCommerce for all its emails.

Configuration

In the WooCommerce settings, go to the "Emails" tab, and in the bottom of the page you will find two fields for the Reply-to address, and one field for the Bcc address. Only if you configure these addresses, these will overwrite any WooCommerce standard address. You can configure only the Reply-to or only the Bcc, but the Reply-to needs both it's fields to be configured to work.




Top comments (0)