Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recover from a stupid plugin update #41

Closed
bobbingwide opened this issue May 16, 2021 · 1 comment
Closed

Recover from a stupid plugin update #41

bobbingwide opened this issue May 16, 2021 · 1 comment
Assignees
Labels
Priority A Highest priority Severity 1 Highest severity

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented May 16, 2021

It's happened a couple of times. Sometimes, before pushing my changes I create a new .zip file for a plugin to test on a live server.
I find some problems, fix them, commit the changes, create a new zip file and re-upload.
But I don't pay attention to where I'm uploading the new .zip file.
WordPress lets me know I'm replacing the current version, but I know that so I continue.
Then I realise I've just uploaded the .zip file into a local install where the plugin I've updated was symlinked to the master GIT repo.
The plugin I've updated appears to work.
But I then discover that the master GIT repository is a completely empty repo.

No .git directory, Nothing.

Fortunately I have the newly installed plugin and the latest .zip file from which it came.
But, because my zip process doesn't package everything the I'm missing the following folders:

  • node_modules
  • tests
  • assets

I can rebuild the node_modules, but can't recover the brand new tests I wrote, nor the commit history since the most recently pushed commit.

BUGGER

Is this a bug?

Is this a bug in WordPress?
Possibly. I know it's something I've tried to address in oik, detecting GIT repositories and symlinked folders.
But when oik's not activated, then this protection is not provided.
So the answer is
Yes. It would appear to be limitation of the new updating capability of WordPress core.

Could I improve my process?

Yes. Before creating the zip file push the most recent commits.

So process would be something like

  • commit changes
  • l10n - Run internationalization and localization routines
  • pu - Run PHPUnit tests
  • tgh - To Git Hub
  • zip - package
  • commit zipped version
  • tgh
  • upload and test

If there's a problem with the zipped version I really only need to change the version number if no one else has had access to the new version.

@bobbingwide bobbingwide added Severity 1 Highest severity Priority A Highest priority labels May 16, 2021
@bobbingwide bobbingwide self-assigned this May 16, 2021
@bobbingwide
Copy link
Owner Author

I'm going to recreate the PHPUnit tests that I wrote for class Oik_attachment_contents in the oik-libs plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority A Highest priority Severity 1 Highest severity
Projects
None yet
Development

No branches or pull requests

1 participant