diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..6d3c62e --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Github repository +REPO="fish-shell/fish-shell" + +# Get tag name using Github Rest API +TAG_NAME=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name') + +# Trim 'v' character in VERSION variable +VERSION=$(echo "$TAG_NAME" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index 13af0bb..0e61706 100644 --- a/pkg.info +++ b/pkg.info @@ -1,6 +1,6 @@ name: fish description: A smart and user-friendly command line shell -version: 4.0.1 +version: 4.0.2 url: https://fishshell.com/ license: GPL2,PSF2,MIT,LGPL2 architecture: any