fix: script sh compliance
This commit is contained in:
parent
cd3e8f8290
commit
054db2b11c
1 changed files with 6 additions and 2 deletions
|
@ -7,8 +7,12 @@ fi
|
||||||
LAST_RELEASE_FILE=/data/alaskartv/androidtv-ci/release.txt
|
LAST_RELEASE_FILE=/data/alaskartv/androidtv-ci/release.txt
|
||||||
|
|
||||||
latest_release=$(curl -s "https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases/latest" | jq -r '.tag_name')
|
latest_release=$(curl -s "https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases/latest" | jq -r '.tag_name')
|
||||||
|
if [ -f "$LAST_RELEASE_FILE" ]; then
|
||||||
if [ "$latest_release" != "$(cat $LAST_RELEASE_FILE 2>/dev/null)" ]; then
|
read -r version < "$LAST_RELEASE_FILE"
|
||||||
|
else
|
||||||
|
version=""
|
||||||
|
fi
|
||||||
|
if [ "$latest_release" != "$version" ]; then
|
||||||
# echo "$latest_release" > "$LAST_RELEASE_FILE"
|
# echo "$latest_release" > "$LAST_RELEASE_FILE"
|
||||||
curl -X POST "https://api.telegram.org/bot$BOT_TOKEN/sendMessage" \
|
curl -X POST "https://api.telegram.org/bot$BOT_TOKEN/sendMessage" \
|
||||||
-d chat_id="$CHAT_ID" \
|
-d chat_id="$CHAT_ID" \
|
||||||
|
|
Loading…
Reference in a new issue