diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..c78d9bc --- /dev/null +++ b/check-version.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Gitlab repository +REPO="GNOME/gtk" + +# Replace slash with URL encoded representation +REPO=$(echo "$REPO" | sed 's|/|%2F|g') + +# Get tag name using Gitlab Rest API +TAG_NAME=$(curl -s -L https://gitlab.gnome.org/api/v4/projects/"$REPO"/repository/tags | jq -r '.[].name' | grep -E '4.*' | head -n1) + +# Trim '-gitlab' suffix +TAG_NAME=$(echo "$TAG_NAME" | sed 's/-gitlab//g') + +# Get version number from tag name +VERSION=$(echo "$TAG_NAME" | rev | cut -d'-' -f1 | rev) + +# Trim 'v' character in VERSION variable +VERSION=$(echo "$VERSION" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index 847804a..a79f7f9 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,6 @@ name: gtk4 description: GObject-based multi-platform GUI toolkit version 4 -version: 4.16.12 -revision: 2 +version: 4.19.4 url: https://www.gtk.org/ license: LGPL2.1-or-later architecture: any diff --git a/source.sh b/source.sh index 29f7b1e..70a37cb 100644 --- a/source.sh +++ b/source.sh @@ -2,7 +2,7 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT -DOWNLOAD="https://download.gnome.org/sources/gtk/${BPM_PKG_VERSION%.*}/gtk-${BPM_PKG_VERSION}.tar.xz" +DOWNLOAD="https://gitlab.gnome.org/GNOME/gtk/-/archive/${BPM_PKG_VERSION}/gtk-${BPM_PKG_VERSION}.tar.gz" FILENAME="${DOWNLOAD##*/}" # The prepare function is executed in the root of the temp directory