1
0
Fork 0
mirror of https://github.com/Luzifer/password.git synced 2024-11-08 17:30:10 +00:00
password/build-workflow.sh
Knut Ahlers 24dcc4fde4
Move workflow building to extra script
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2017-09-22 17:52:10 +02:00

31 lines
727 B
Bash

#!/bin/bash
set -ex
set -o pipefail
# Check for a publishable version
VERSION=$(git describe --tags --exact-match || echo "notag")
if ( test "${VERSION}" == "notag" ); then
echo "No exact tag found, no publishing required."
exit 0
fi
# Collect assets to pack
mkdir -p dist
cp -r password_darwin_amd64 \
alfred-workflow/exec.py \
alfred-workflow/icon.png \
alfred-workflow/info.plist \
alfred-workflow/lib/workflow \
dist
echo -n "${VERSION}" > dist/version
# Create ZIP
cd dist
zip -r -9 ../PasswordGenerator.alfredworkflow *
cd -
# Upload to Github releases
github-release upload --user luzifer --repo password --tag ${VERSION} \
--name PasswordGenerator.alfredworkflow \
--file PasswordGenerator.alfredworkflow