1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

fix update.sh script to get version

This commit is contained in:
Molchanov Timofey 2021-11-14 16:30:01 +01:00
parent df03e02045
commit beab5a402c

View file

@ -4,8 +4,9 @@ REPO="anytypeio/go-anytype-middleware"
FILE="addon.tar.gz"
GITHUB="api.github.com"
token=$1;
platform=$2;
user=$1
token=$2;
platform=$3;
arch="";
if [ "$platform" = "ubuntu-latest" ]; then
@ -32,8 +33,8 @@ if [ "$arch" = "" ]; then
fi;
mwv=`cat middleware.version`
version=`curl -H "Authorization: token $token" -H "Accept: application/vnd.github.v3+json" -sL https://$GITHUB/repos/$REPO/releases/tags/v$mwv | jq .`
version=`curl -u "$user:$token" -H "Accept: application/vnd.github.v3+json" -sL https://$GITHUB/repos/$REPO/releases/tags/v$mwv | jq .`
tag=`echo $version | jq ".tag_name"`
asset_id=`echo $version | jq ".assets | map(select(.name | match(\"js_v[0-9]+.[0-9]+.[0-9]+(-rc[0-9]+)?_$arch\";\"i\")))[0].id"`