diff options
Diffstat (limited to 'scripts/upload.sh')
| -rwxr-xr-x | scripts/upload.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/upload.sh b/scripts/upload.sh new file mode 100755 index 0000000..a2881c5 --- /dev/null +++ b/scripts/upload.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -e + + +if [ "$#" -ne 4 ]; then + echo "Usage: $0 <project_name> <build_directory> <quicksilver_directory> <upload_location>" + exit 1 +fi + +project_name="$1" +build_directory="$2" +quicksilver_directory="$3" +upload_location="$4" + +plugin_path="${quicksilver_directory}/Quicksilver.app/Contents/Plugins/${project_name}" +plugin_version=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${plugin_path}/Contents/Info.plist") +zip_path="${build_directory}/${project_name}-${plugin_version}.zip" + +echo "Uploading ${zip_path} to ${upload_location}" +rsync -avz "${zip_path}" "${upload_location}" +rsync -avz "${zip_path}".minisig "${upload_location}" |