This is wercker build step script to package your directories as .zip
.
In the wercker.yml
of your application use the following step definition:
steps:
- rhelling/find-zip:
path: ${WERCKER_ROOT}
find: $WERCKER_OUTPUT_DIR/dist/assets
zipname: $WERCKER_OUTPUT_DIR/release.zip
You must set path
to the path to execute find, find
to the directories you want to package are in and zipname
where zip archive will be generated. Both must be set as absolte path ($WERCKER_OUTPUT_PATH
is built-in environmental valiable which is used for pass the artifacts between build step and deploy step).
If you use wercker-box which is not installed zip
, you need additional step:
steps:
- script:
name: install zip:
code: |
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y zip
- rhelling/zip
path: "${WERCKER_ROOT}/dist"
find: "assets/{js,css}"
zipname: "release/release.zip"