Skip to content

Commit 4aa4f51

Browse files
committed
update release script
1 parent d7f1573 commit 4aa4f51

1 file changed

Lines changed: 25 additions & 11 deletions

File tree

release.sh

100644100755
Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,42 @@
33
# Copyright 2023-present, Mark Delk
44
# SPDX-License-Identifier: Apache-2.0
55

6+
# Usage:
7+
# ./release.sh 0.3.50 v0.4.0
8+
69
set -ex
710

11+
if [ "$1" = "" ]; then
12+
echo "Missing VOSK-VERSION"
13+
echo "Usage: $0 <VOSK-VERSION> <TAG>"
14+
exit 1
15+
fi
16+
17+
if [ "$2" = "" ]; then
18+
echo "Missing TAG"
19+
echo "Usage: $0 <VOSK-VERSION> <TAG>"
20+
exit 1
21+
fi
22+
823
rm -rf ./tmp
924
gh run download -D tmp -n vosk
1025

1126
tree tmp
1227
cd tmp
1328

14-
VERSION='0.3.50'
15-
TAG='v0.3.0'
16-
17-
# NOTE: on linux, use --owner=0 --group=0
18-
tar czvf "vosk-$VERSION-x86_64-macos.tar.gz" --uid=0 --gid=0 x86_64-macos
19-
tar czvf "vosk-$VERSION-aarch64-macos.tar.gz" --uid=0 --gid=0 aarch64-macos
29+
VERSION="$1"
30+
TAG="$2"
2031

32+
if [ "$(uname)" == "Darwin" ]; then
33+
tar czvf "vosk-$VERSION-x86_64-macos.tar.gz" --uid=0 --gid=0 x86_64-macos
34+
tar czvf "vosk-$VERSION-aarch64-macos.tar.gz" --uid=0 --gid=0 aarch64-macos
35+
else
36+
tar czvf "vosk-$VERSION-x86_64-macos.tar.gz" --owner=0 --group=0 x86_64-macos
37+
tar czvf "vosk-$VERSION-aarch64-macos.tar.gz" --owner=0 --group=0 aarch64-macos
38+
fi
2139

2240
gh release create "$TAG" -n "
23-
Builds of https://github.com/alphacep/vosk-api.
24-
25-
### NOTE
26-
27-
Vosk release: https://github.com/alphacep/vosk-api/releases/tag/v$VERSION
41+
Vosk ([v$VERSION](https://github.com/alphacep/vosk-api/releases/tag/v$VERSION)), Zig $(zig version)
2842
"
2943

3044
gh release upload --clobber "$TAG" "vosk-$VERSION-x86_64-macos.tar.gz"

0 commit comments

Comments
 (0)