From 3f28ed679719bba0b808bbecb6ffade843a4f0fb Mon Sep 17 00:00:00 2001 From: EnumDev Date: Tue, 9 Sep 2025 17:13:35 +0300 Subject: [PATCH] Update package version to 3.10.0 --- check-version.sh | 12 ++++++++++++ pkg.info | 2 +- source.sh | 21 ++++++++++++--------- 3 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 check-version.sh diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..3196275 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Github repository +REPO="catchorg/Catch2" + +# 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"/releases/latest | jq -r '.tag_name') + +# Trim 'v' character in TAG_NAME variable +VERSION=$(echo "$TAG_NAME" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index 5cec52c..cc06992 100644 --- a/pkg.info +++ b/pkg.info @@ -1,6 +1,6 @@ name: catch2 description: A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later -version: 3.7.1 +version: 3.10.0 url: https://github.com/catchorg/catch2 license: BSL1 architecture: any diff --git a/source.sh b/source.sh index 87129ac..7ab54c6 100644 --- a/source.sh +++ b/source.sh @@ -18,28 +18,31 @@ build() { mkdir build cd build - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCATCH_BUILD_EXAMPLES=OFF \ - -DCATCH_ENABLE_COVERAGE=OFF \ - -DCATCH_ENABLE_WERROR=OFF \ - -DBUILD_TESTING=OFF \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCATCH_BUILD_EXAMPLES=OFF \ + -DCATCH_ENABLE_COVERAGE=OFF \ + -DCATCH_ENABLE_WERROR=OFF \ + -DCATCH_DEVELOPMENT_BUILD=ON \ + -DBUILD_TESTING=ON \ -DBUILD_SHARED_LIBS=OFF .. - make + cmake --build . } # The check function is executed in the source directory # This function is used to run tests to verify the package has been compiled correctly check() { cd build - make check + + ctest } # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package() { cd build - make DESTDIR="$BPM_OUTPUT" install + + DESTDIR="$BPM_OUTPUT" cmake --install . install -Dm644 "$BPM_SOURCE"/LICENSE.txt "$BPM_OUTPUT"/usr/share/licenses/catch2/LICENSE.txt }