From 0082fa0c7796da8aa9eb15adda6145406c08e3e7 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sat, 13 Dec 2025 10:47:41 +0200 Subject: [PATCH] Update package version to 1.28.0 --- check-version.sh | 15 +++++++++++++++ pkg.info | 7 ++++++- source.sh | 10 ---------- 3 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 check-version.sh diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..df60285 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Github repository +REPO="pypa/hatch" + +# Get tag name using Github Rest API +TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/tags | jq -r '.[].name' | grep '^hatchling-' | head -n1) + +# Get version number from tag name +VERSION=$(echo "$TAG_NAME" | cut -d'-' -f2) + +# Trim 'v' character in VERSION variable +VERSION=$(echo "$VERSION" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index f9c66a2..88925f5 100644 --- a/pkg.info +++ b/pkg.info @@ -1,6 +1,6 @@ name: python-hatchling description: This is the extensible, standards compliant build backend used by Hatch -version: 1.27.0 +version: 1.28.0 revision: 1 url: https://github.com/pypa/hatch/tree/master/backend license: MIT @@ -17,3 +17,8 @@ depends: make_depends: - python-build - python-installer +downloads: + - url: https://github.com/pypa/hatch/archive/hatchling-v${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: 3a52e40675ab341eab0720fe22cbd82b6a0d18a6445e2ce6bb9aebb831ca79cd diff --git a/source.sh b/source.sh index cf3df1b..4b940ef 100644 --- a/source.sh +++ b/source.sh @@ -2,16 +2,6 @@ # 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://github.com/pypa/hatch/archive/hatchling-v${BPM_PKG_VERSION}.tar.gz" -FILENAME="${DOWNLOAD##*/}" - -# The prepare function is executed in the root of the temp directory -# This function is used for downloading files and putting them into the correct location -prepare() { - wget "$DOWNLOAD" - tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" -} - # The build function is executed in the source directory # This function is used to compile the source code build() {