Currently this only provides plu-up
, a small utility, written in bash, for managing the upload of themes to a Plone site. It depends on plonetheme-upload
. The goal is to make it as easy as possible to update a theme on a plone site from the commandline.
Using the prefix "plu-", provides a short, and hopefully inituitive, namespace for "plone command-line utilties". I hope that the plu- namespace can be used for other utilities. This could also be thought of as a proving ground. If a plu- utility makes sense, we'd try to eventually roll it into the plone-cli project.
I needed to integrate some ssh-tunnelling "magic" (documented here: https://stackoverflow.com/questions/2241063/bash-script-to-setup-a-temporary-ssh-tunnel). Hopefully this is useful to others.
Install the dependency (we assume you know how to work with npm):
npm i -g plonetheme-upload
download the pl-config file. Customize the pl-config file to match your server and plone instance information.
wget https://goo.gl/MYrZ9i -O ~/.plu-config
Edit the settings of $HOME/.plu-config to match your plone instance and server settings.
export plone_ssh_user=plone
export plone_server="example.com"
export plone_target_port=8080
export plone_local_port=8081
export plone_instance_path=test
Add to your bash_profile.
echo '. $HOME/.plu-config' >> ~/.bash_profile
. ~/.bash_profile
To upload a theme, simpling "point" the plu-up
utility at your theme directory. It will invoke plonetheme-upload and push the theme to your server.
pl-up path/to/theme
If you prefer you can use the more explicit plu-upload
which is an alias for plu-up
plu-upload path/to/theme