OK, I guess this is weird.
I have a small stage.sh script very simply has a bunch of commands:
if [ "$(whoami)" == 'David' ]; then
rsync -a --delete-excluded --exclude-from=.rsyncrc $(pwd) ~/Sites/local-testing-0/modules/
rsync -a --delete-excluded --exclude-from=.rsyncrc $(pwd) ~/Sites/local-testing-1/modules/
rsync -a --delete-excluded --exclude-from=.rsyncrc $(pwd) ~/Sites/local-testing-7/modules/
rsync -a --delete-excluded --exclude-from=.rsyncrc $(pwd) ~/Sites/local-testing-2/modules/
echo "Checked out for David"
fi
And there are also other cases according to the current logged-in user. Note that the source is the current directory (see the $(pwd)). I want to add a case that takes the current directory and makes a zipped folder out it. By zipped folder I mean no tarbomb, and it must be in zip format. I'd want to take the output of the rsync transfer, because it already filters stuff. I tried using named pipes. I could also use the file .rsyncrc
for exclusions in the tar/zipping process. It reads like this:
# Meta
- stage.sh
- .rsyncrc
# Repo itself
- .git
- .gitignore
# Distribution Packages
- dist/
# Other files
- */.DS_Store
So if I could just use this file for exclusion in the zipping process, than it would be great too. I didn't really test this, but I'm not sure it's possible. The output should be placed in ./dist/, which is excluded from the rsync/zipping process.
Bonus points if the name of the output zip filename had a version number -suffix, taken from inside the file that has the same name of the folder with ".php" appended. The line with the version number is always like this: $this->version = '0.0.1';