From fdd87dd9563bc139d27cb147c75e122fd4871e07 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Wed, 21 Mar 2018 11:21:54 +0100 Subject: [PATCH] Fix: Workflow building broken by zipping artifacts Signed-off-by: Knut Ahlers --- build-workflow.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/build-workflow.sh b/build-workflow.sh index dd4454f..f845573 100644 --- a/build-workflow.sh +++ b/build-workflow.sh @@ -1,30 +1,33 @@ #!/bin/bash - -set -ex -set -o pipefail +set -euxo 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 \ +unzip ./.build/password_darwin_amd64.zip -d dist +cp -r \ alfred-workflow/exec.py \ alfred-workflow/icon.png \ alfred-workflow/info.plist \ alfred-workflow/lib/workflow \ dist -echo -n "${VERSION}" > dist/version + +# In order to have a valid version number on no tags for testing +git describe --tags >dist/version # Create ZIP cd dist zip -r -9 ../PasswordGenerator.alfredworkflow * cd - +# If there is no version tag the artifact is not to be published +if (test "${VERSION}" == "notag"); then + echo "No exact tag found, no publishing required." + exit 0 +fi + # Upload to Github releases github-release upload --user luzifer --repo password --tag ${VERSION} \ --name PasswordGenerator.alfredworkflow \