Skip to content

Latest commit

 

History

History
92 lines (62 loc) · 3.9 KB

DEVELOPER-NOTES.md

File metadata and controls

92 lines (62 loc) · 3.9 KB

Fewbricks DEV Notes

Notes to Fewbricks Developers (a.k.a. me/Björn Folbert).

Table of Contents generated with DocToc

Testing as both plugin and custom install location

In the development environment, the Fewbricks and Fewbricks Hidden repos are placed in a dedicated folder outside of the WordPress-installation and the dev server. We then use symlinks to that folder in order to be able to test running Fewbricks from different locations.

Test as composer package in theme

Create symlinks

vagrant ssh -- -t "ln -s /var/www/fewbricksrepos/ /var/www/web/app/themes/echocrate-sage-9_0_9/vendor/folbert"

Remove symlinks

vagrant ssh -- -t "cd /var/www/web/app/themes/echocrate-sage-9_0_9/vendor/; unlink folbert"

Test as plugin

Create symlinks

vagrant ssh -- -t "ln -s /home/vagrant/code/fewbricksrepos/fewbricks/ /home/vagrant/code/web/app/plugins/fewbricks; ln -s /home/vagrant/code/fewbricksrepos/acf-fewbricks-hidden/ /home/vagrant/code/web/app/plugins/acf-fewbricks-hidden"

Note that you must enable the plugin as any other WP plugin.

Remove symlinks

vagrant ssh -- -t "cd /home/vagrant/code/web/app/plugins/; unlink fewbricks; unlink acf-fewbricks-hidden"

Testing in other environments

We can have multiple test servers set up which, using Composer, pulls branches (feature or release) and tests them.

Documentation

Writing

The documentation is written using Jekyll. Ruby version is managed using RBENV (RBENV info in Jekyll documentation).

After you have Jekyll set up, head into the docs folder and use these commands (and https://jekyllrb.com/docs/usage/).

bundle exec jekyll serve to be able to view the site at http://127.0.0.1:4000/ which will rebuild automatically when you edit a MD-file.

bundle exec jekyll build which will build the site and prepare it for deploy.

Testing

For easy access to built docs, add a symlink from the web folder to the built site using this command:

vagrant ssh -- -t "ln -s /var/www/___fewbricksrepos___/fewbricks/docs/_site/ /var/www/web/fewbricks-docs"

If the server command above has been executed, you can now view the docs at https://[DOMAIN]/fewbricks-docs.

To remove the symlink vagrant ssh -- -t "cd /var/www/web/; unlink fewbricks-docs"

Publishing

Use the publish script located in the docs folder to rsync to https://fewbricks2.folbert.com

``

Release Workflow

These are notes to make sure that I don't forget anything when creating a new release.

Version numbering follows Semantic Versioning.

Start version number with a "v".

  1. Start a release locally. Start version number with a "v".

  2. Describe new version in CHANGELOG.md

  3. Change version nr in comment in fewbricks.php

  4. Change FEWBRICKS_VERSION in src/Fewbricks.php

  5. Finish the release

  6. Push

  7. After master has been pushed, create release on GitHub.

  8. Update https://version.fewbricks2.folbert.com/version-info.php with the correct data