bobbingwide / oik-update

WP-a2z repository update automation
0 stars 0 forks source link

Improve the process for updating wp-a2z.org #1

Open bobbingwide opened 5 years ago

bobbingwide commented 5 years ago

I need to improve the method whereby updates to plugins and themes can be applied to wp-a2z.org efficiently. A time consuming part of the process has been downloading the latest runtime version of a component, extracting it to the WP-a2z repository, updating the repository and then running the batch process to rebuild the API reference.

This issue is to document the requirements and solution for building the API reference for the existing plugins and themes.

The logic has to cater for exceptions such as:

  1. The repository name for WordPress is wp-a2z.
  2. wp-a2z has some hand cranked files: README.md and .gitignore
  3. The Genesis theme framework is not downloadable from wordpress.org
bobbingwide commented 5 years ago

A couple of problems detected when processing the Genesis theme framework. The .gitkeep file in the \docs\css folder prevents the directory from being emptied so we get a warning message calling rmdir.

Consequently, when files are being extracted from the zip file we get prompted about file replacement.

0Array
(
    [0] =>
    [1] => 7-Zip 18.05 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2018-04-30
    [2] =>
    [3] => Scanning the drive for archives:
    [4] => 1 file, 875236 bytes (855 KiB)
    [5] =>
    [6] => Extracting archive: C:\apache\htdocs\downloads\themes\genesis.2.10.1.zip
    [7] => --
    [8] => Path = C:\apache\htdocs\downloads\themes\genesis.2.10.1.zip
    [9] => Type = zip
    [10] => Physical Size = 875236
    [11] =>
    [12] =>
    [13] => Would you like to replace the existing file:
    [14] =>   Path:     .\genesis\docs\css\.gitkeep
    [15] =>   Size:     0 bytes
    [16] =>   Modified: 2019-05-01 18:46:54
    [17] => with the file from archive:
    [18] =>   Path:     genesis\docs\css\.gitkeep
    [19] =>   Size:     0 bytes
    [20] =>   Modified: 2019-05-07 17:43:26
    [21] => ? (Y)es / (N)o / (A)lways / (S)kip all / A(u)to rename all / (Q)uit?
    [22] => Everything is Ok
    [23] =>
    [24] => Folders: 36
    [25] => Files: 302
    [26] => Size:       1801377
    [27] => Compressed: 875236
)
bobbingwide commented 5 years ago

Extracting wordpress from wordpress.zip puts the files into the wrong directory - wordpress rather than wp-a2z. Perhaps we should rename the wp-a2z folder to wordpress before performing the extract then rename it back to wp-a2z afterwards.

bobbingwide commented 4 years ago

I need to add some logic to prevent a true source repository from being updated from the runtime version. It made a complete mess of EDD.

bobbingwide commented 3 years ago

Also, update the logic to be able to use oik autoload when slog and/or slog-bloat are activated. slog uses shared library autoloading.

bobbingwide commented 3 years ago

I had a problem trying to update Gutenberg to 10.6.0-rc.1 from the zip file downloaded from GitHub. The extract logic assumes that the .zip file stores all the files in the correctly named folder. This is not the case. The files were extracted to C:\github\wp-a2z so nothing was committed. To recover I needed to pull the repository again, rerun the extract, realise the problem then manually move the files into the gutenberg folder and add and commit again.

Perhaps the extract process should use a separate directory for the extraction and then move the extracted files taking into account the directory structure that's been created.

bobbingwide commented 2 years ago

I'm not going to close this yet. Using the update command I'm able to update a component to a new version. But I have to specify the version on the command line. Currently, for plugins I need to look at the plugin's Advanced view ( eg https://wordpress.org/plugins/woocommerce/advanced/ ) and determine the versions I want to support. Note: I normally ignore betas and release candidates. Then I have to run the update command for each version that's not in my repo.

Requirement

Proposed solution

For plugins:

For themes: tbc For WordPress: tbc