From 8d62a2d78284a27f8129b0e74bfb6d5da39cf203 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sat, 20 Sep 2025 10:20:07 +0300 Subject: [PATCH] Update package version to 3.3.3 --- check-version.sh | 12 ++++++++++++ pkg.info | 2 +- source.sh | 22 ++++++++-------------- 3 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 check-version.sh diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..471e519 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Github repository +REPO="rapidfuzz/rapidfuzz-cpp" + +# 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 d1850e6..5a6cd75 100644 --- a/pkg.info +++ b/pkg.info @@ -1,6 +1,6 @@ name: rapidfuzz-cpp description: Rapid fuzzy string matching in C++ using the Levenshtein Distance -version: 3.3.2 +version: 3.3.3 url: https://github.com/rapidfuzz/rapidfuzz-cpp license: MIT architecture: any diff --git a/source.sh b/source.sh index d818a1c..99750d1 100644 --- a/source.sh +++ b/source.sh @@ -15,31 +15,25 @@ prepare() { # The build function is executed in the source directory # This function is used to compile the source code build() { - mkdir build - cd build - - cmake -D RAPIDFUZZ_BUILD_TESTING=ON \ - -D RAPIDFUZZ_ENABLE_LINTERS=ON \ - -D CMAKE_BUILD_TYPE=None \ + cmake -B build \ + -D RAPIDFUZZ_BUILD_TESTING=ON \ + -D RAPIDFUZZ_ENABLE_LINTERS=OFF \ -D CMAKE_INSTALL_PREFIX=/usr \ - -W no-dev .. - make + -W no-dev + cmake --build 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 - - ctest --output-on-failure + ctest --test-dir build --output-on-failure } # 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 build + # Install package license install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/rapidfuzz-cpp/LICENSE }