From 4ed61efd6568211efab5c2949f9480233b4004a6 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 15 Jan 2026 20:19:05 +0100 Subject: [PATCH] chore: bump version --- README.md | 2 +- include/sharg/version.hpp | 4 +- .../1.2.0/0001-NOAPI-Bump-version.patch | 50 ++++++++++++++++++ test/api_stability/CMakeLists.txt | 4 +- test/api_stability/README.md | 52 ++++++++++++++----- test/snippet/readme_sneak_peek.out | 2 +- test/unit/detail/format_ctd_test.cpp | 2 +- test/unit/detail/format_cwl_test.cpp | 2 +- 8 files changed, 98 insertions(+), 20 deletions(-) create mode 100644 test/api_stability/1.2.0/0001-NOAPI-Bump-version.patch diff --git a/README.md b/README.md index 94d82c58..b7126b47 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,7 @@ OPTIONS VERSION Last update: Eat-Me-App version: - Sharg version: 1.2.0 + Sharg version: 1.2.1-rc.1 ``` diff --git a/include/sharg/version.hpp b/include/sharg/version.hpp index 087156dc..513492a2 100644 --- a/include/sharg/version.hpp +++ b/include/sharg/version.hpp @@ -17,9 +17,9 @@ //!\brief The minor version as MACRO. #define SHARG_VERSION_MINOR 2 //!\brief The patch version as MACRO. -#define SHARG_VERSION_PATCH 0 +#define SHARG_VERSION_PATCH 1 //!\brief The release candidate number. 0 means stable release, >= 1 means release candidate. -#define SHARG_RELEASE_CANDIDATE 0 +#define SHARG_RELEASE_CANDIDATE 1 //!\brief The full version as MACRO (number). #define SHARG_VERSION (SHARG_VERSION_MAJOR * 10000 + SHARG_VERSION_MINOR * 100 + SHARG_VERSION_PATCH) diff --git a/test/api_stability/1.2.0/0001-NOAPI-Bump-version.patch b/test/api_stability/1.2.0/0001-NOAPI-Bump-version.patch new file mode 100644 index 00000000..02efecd1 --- /dev/null +++ b/test/api_stability/1.2.0/0001-NOAPI-Bump-version.patch @@ -0,0 +1,50 @@ +From 7353a6da25516f7532339b0b647d5a767e4ccad4 Mon Sep 17 00:00:00 2001 +From: Enrico Seiler +Date: Thu, 15 Jan 2026 20:25:02 +0100 +Subject: [PATCH] [NOAPI] Bump version + +--- + test/snippet/readme_sneak_peek.out | 2 +- + test/unit/detail/format_ctd_test.cpp | 2 +- + test/unit/detail/format_cwl_test.cpp | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test/snippet/readme_sneak_peek.out b/test/snippet/readme_sneak_peek.out +index e51f728..1e30290 100644 +--- a/test/snippet/readme_sneak_peek.out ++++ b/test/snippet/readme_sneak_peek.out +@@ -28,4 +28,4 @@ OPTIONS + VERSION + Last update: + Eat-Me-App version: +- Sharg version: 1.2.0 ++ Sharg version: 1.2.1-rc.1 +diff --git a/test/unit/detail/format_ctd_test.cpp b/test/unit/detail/format_ctd_test.cpp +index 320119b..b8d8523 100644 +--- a/test/unit/detail/format_ctd_test.cpp ++++ b/test/unit/detail/format_ctd_test.cpp +@@ -114,7 +114,7 @@ TEST_F(format_ctd_test, empty_information) + // Create the dummy parser. + auto parser = get_parser("--export-help", "ctd"); + parser.info.date = "December 01, 1994"; +- parser.info.version = "1.2.0"; ++ parser.info.version = "1.2.1-rc.1"; + parser.info.man_page_title = "default_man_page_title"; + parser.info.short_description = "A short description here."; + +diff --git a/test/unit/detail/format_cwl_test.cpp b/test/unit/detail/format_cwl_test.cpp +index dece1f7..990ea66 100644 +--- a/test/unit/detail/format_cwl_test.cpp ++++ b/test/unit/detail/format_cwl_test.cpp +@@ -21,7 +21,7 @@ TEST_F(format_cwl_test, empty_information) + // Create the dummy parser. + auto parser = get_parser("--export-help", "cwl"); + parser.info.date = "December 01, 1994"; +- parser.info.version = "1.2.0"; ++ parser.info.version = "1.2.1-rc.1"; + parser.info.man_page_title = "default_man_page_title"; + parser.info.short_description = "A short description here."; + +-- +2.47.3 + diff --git a/test/api_stability/CMakeLists.txt b/test/api_stability/CMakeLists.txt index 263d542f..f844c0c7 100644 --- a/test/api_stability/CMakeLists.txt +++ b/test/api_stability/CMakeLists.txt @@ -15,11 +15,11 @@ find_package (Git) include (../sharg-test.cmake) include (ExternalProject) -set (SHARG_LAST_STABLE_VERSION "1.1.1") +set (SHARG_LAST_STABLE_VERSION "1.2.0") set (SHARG_LAST_STABLE_SOURCE_URL "https://github.com/seqan/sharg-parser/releases/download/${SHARG_LAST_STABLE_VERSION}/sharg-${SHARG_LAST_STABLE_VERSION}-Source.tar.xz" ) -set (SHARG_LAST_STABLE_SOURCE_SHA256 "7330f06501718e7871e55e5fd70d0e41472cc8b34bd0e3519f8c5547510c671c") +set (SHARG_LAST_STABLE_SOURCE_SHA256 "aac491bbde0d4d5446277c7c1f6cb4b814b2b4793b14b77f9838f139d50ae29f") set (SHARG_API_STABILITY_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSHARG_DISABLE_DEPRECATED_WARNINGS=1") diff --git a/test/api_stability/README.md b/test/api_stability/README.md index 56ab1839..35653a5e 100644 --- a/test/api_stability/README.md +++ b/test/api_stability/README.md @@ -29,13 +29,13 @@ CMAKE_BUILD_PARALLEL_LEVEL=40 cmake --build . ### How does this work? -In the following we will use `1.1.1` as the latest stable release (LSR). +In the following we will use `1.2.0` as the latest stable release (LSR). The workflow entails these steps: 1. Download and unzip the LSR. 2. Remove everything from the LSR except the tests in `/test/`. 3. Apply patches from the current git version on the LSR, i.e., patches found in - `/test/api_stability/1.1.1`. + `/test/api_stability/1.2.0`. * These patches will only apply changes on the tests. * This step is necessary as some of our tests also test non-public / non-stable API. 3. Use the current version of `find_package (Sharg)` found in `/cmake`. @@ -84,25 +84,50 @@ There are two categories of API changes that are reflected in the patches (prefi ### How to create patches? -In the following, we will use `1.1.1` as the latest stable release (LSR). +
Click for tl;dr -Create a new branch based on the LSR and apply all existing patches in `/test/api_stability/1.1.1`. +```bash +git update-ref -d refs/heads/api-stability-patches +mkdir -p /tmp/sharg-api-stability-patches +cp -u=all test/api_stability/1.2.0/*.patch /tmp/sharg-api-stability-patches +git checkout -b api-stability-patches 1.2.0 +git am --keep-non-patch /tmp/sharg-api-stability-patches/*.patch +rm -f /tmp/sharg-api-stability-patches/*.patch + +git cherry-pick + +git format-patch 1.2.0 +mv *.patch /tmp/sharg-api-stability-patches +git checkout - +cp -u /tmp/sharg-api-stability-patches/*.patch test/api_stability/1.2.0/ +rm -rf /tmp/sharg-api-stability-patches +git branch -D api-stability-patches + +git add test/api_stability/1.2.0/ +git commit +``` + +
+ +In the following, we will use `1.2.0` as the latest stable release (LSR). + +Create a new branch based on the LSR and apply all existing patches in `/test/api_stability/1.2.0`. ``` cd # copy over patches to a tmp directory (`git am` seems to not support applying patches onto a different branch) mkdir -p /tmp/sharg-api-stability-patches -cp test/api_stability/1.1.1/*.patch /tmp/sharg-api-stability-patches +cp test/api_stability/1.2.0/*.patch /tmp/sharg-api-stability-patches # create a new branch based on the LSR and switch to it -git checkout -b api-stability-patches 1.1.1 +git checkout -b api-stability-patches 1.2.0 -# apply all patches onto 1.1.1 (--keep-non-patch will keep `[NOAPI]` tags in the commit message) +# apply all patches onto 1.2.0 (--keep-non-patch will keep `[NOAPI]` tags in the commit message) git am --keep-non-patch /tmp/sharg-api-stability-patches/*.patch # clean up applied patches -rm /tmp/sharg-api-stability-patches/*.patch +rm -f /tmp/sharg-api-stability-patches/*.patch ``` Now re-apply the commit(s) that changed the API. @@ -129,8 +154,8 @@ It is also important that you double check if the patch only contains changes th After that, we can export all patches. ``` -# export all patches since 1.1.1 -git format-patch 1.1.1 +# export all patches since 1.2.0 +git format-patch 1.2.0 # move them to tmp directory mv *.patch /tmp/sharg-api-stability-patches @@ -141,15 +166,18 @@ Now change to your branch that you were working on and check-in the patches. ``` git checkout - -cp /tmp/sharg-api-stability-patches/*.patch test/api_stability/1.1.1/ +cp -u /tmp/sharg-api-stability-patches/*.patch test/api_stability/1.2.0/ rm -rf /tmp/sharg-api-stability-patches # add new patches -git add test/api_stability/1.1.1/ +git add test/api_stability/1.2.0/ # commit changes git commit + +# delete local branch +git branch -D api-stability-patches ``` Before pushing, try whether the patches work as intended. diff --git a/test/snippet/readme_sneak_peek.out b/test/snippet/readme_sneak_peek.out index e51f7286..1e30290e 100644 --- a/test/snippet/readme_sneak_peek.out +++ b/test/snippet/readme_sneak_peek.out @@ -28,4 +28,4 @@ OPTIONS VERSION Last update: Eat-Me-App version: - Sharg version: 1.2.0 + Sharg version: 1.2.1-rc.1 diff --git a/test/unit/detail/format_ctd_test.cpp b/test/unit/detail/format_ctd_test.cpp index 320119b4..b8d85235 100644 --- a/test/unit/detail/format_ctd_test.cpp +++ b/test/unit/detail/format_ctd_test.cpp @@ -114,7 +114,7 @@ TEST_F(format_ctd_test, empty_information) // Create the dummy parser. auto parser = get_parser("--export-help", "ctd"); parser.info.date = "December 01, 1994"; - parser.info.version = "1.2.0"; + parser.info.version = "1.2.1-rc.1"; parser.info.man_page_title = "default_man_page_title"; parser.info.short_description = "A short description here."; diff --git a/test/unit/detail/format_cwl_test.cpp b/test/unit/detail/format_cwl_test.cpp index dece1f7e..990ea663 100644 --- a/test/unit/detail/format_cwl_test.cpp +++ b/test/unit/detail/format_cwl_test.cpp @@ -21,7 +21,7 @@ TEST_F(format_cwl_test, empty_information) // Create the dummy parser. auto parser = get_parser("--export-help", "cwl"); parser.info.date = "December 01, 1994"; - parser.info.version = "1.2.0"; + parser.info.version = "1.2.1-rc.1"; parser.info.man_page_title = "default_man_page_title"; parser.info.short_description = "A short description here.";