mirror of
https://github.com/Luzifer/password.git
synced 2024-11-09 01:40:04 +00:00
Move workflow building to extra script
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
e314b806c7
commit
24dcc4fde4
2 changed files with 32 additions and 10 deletions
11
Makefile
11
Makefile
|
@ -16,13 +16,4 @@ publish:
|
||||||
bash golang.sh
|
bash golang.sh
|
||||||
|
|
||||||
workflow:
|
workflow:
|
||||||
mkdir -p dist
|
bash build-workflow.sh
|
||||||
cp -r password_darwin_amd64 \
|
|
||||||
alfred-workflow/exec.py \
|
|
||||||
alfred-workflow/icon.png \
|
|
||||||
alfred-workflow/info.plist \
|
|
||||||
alfred-workflow/lib/workflow \
|
|
||||||
dist
|
|
||||||
echo -n $(shell git describe --tags --exact-match) > dist/version
|
|
||||||
cd dist && zip -r -9 ../PasswordGenerator.alfredworkflow *
|
|
||||||
github-release upload --user luzifer --repo password --tag $(shell git describe --tags --exact-match) --name PasswordGenerator.alfredworkflow --file PasswordGenerator.alfredworkflow
|
|
||||||
|
|
31
build-workflow.sh
Normal file
31
build-workflow.sh
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/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
|
Loading…
Reference in a new issue