#!/bin/bash
pushd ..
  zip --exclude=*examples* --exclude=*docs* --exclude=*test* --exclude=*pcf-tile* --exclude=*node_modules* --exclude=README.md  --exclude=manifest.yml -r pcf-tile/resources/meta-azure-service-broker.zip *
popd
if [ "$1" = "-major" ]; then
  tile build major
elif [ "$1" = "-minor" ]; then
  tile build minor
else
  tile build
fi

#!/bin/bash
pushd ..
  rm -f pcf-tile/resources/meta-azure-service-broker.zip
  zip --exclude=*examples* --exclude=*docs* --exclude=*test* --exclude=*pcf-tile* --exclude=*node_modules* --exclude=README.md  --exclude=manifest.yml -r pcf-tile/resources/meta-azure-service-broker.zip *
popd
if [ "$1" = "-major" ]; then
  tile build major
elif [ "$1" = "-minor" ]; then
  tile build minor
else
  tile build
fi

Remove meta-azure-service-broker.zip before zipping it
Remove meta-azure-service-broker.zip before zipping it

If a file is renamed from A to B, the old file A still exists in meta-azure-service-broker.zip if we don't remove the zip file before zipping it.
