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
- Testing in other environments
- Documentation
- Release Workflow
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.
vagrant ssh -- -t "ln -s /var/www/fewbricksrepos/ /var/www/web/app/themes/echocrate-sage-9_0_9/vendor/folbert"
vagrant ssh -- -t "cd /var/www/web/app/themes/echocrate-sage-9_0_9/vendor/; unlink folbert"
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.
vagrant ssh -- -t "cd /home/vagrant/code/web/app/plugins/; unlink fewbricks; unlink acf-fewbricks-hidden"
We can have multiple test servers set up which, using Composer, pulls branches (feature or release) and tests them.
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.
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"
Use the publish script located in the docs folder to rsync to https://fewbricks2.folbert.com
``
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".
-
Start a release locally. Start version number with a "v".
-
Describe new version in CHANGELOG.md
-
Change version nr in comment in fewbricks.php
-
Change FEWBRICKS_VERSION in src/Fewbricks.php
-
Finish the release
-
Push
-
After master has been pushed, create release on GitHub.
-
Update https://version.fewbricks2.folbert.com/version-info.php with the correct data