Update package

Note

If package lives in https://github.com/hunter-packages, it should be released there first. Check Patch sources section.

Create branch for working on package update:

[hunter]> git checkout master
[hunter]> git checkout -b pr.hunter_box_1

Calculate SHA1 of release:

> wget https://github.com/hunterbox/hunter_box_1/archive/v1.0.1.tar.gz
> openssl sha1 v1.0.1.tar.gz
SHA1(v1.0.1.tar.gz)= 10d046eec6c8b0aabd28bd3d1b99faf6beeb226b

Add URL and SHA1 to corresponding hunter.cmake:

--- /home/docs/checkouts/readthedocs.org/user_builds/hunter/checkouts/stable/docs/creating-new/hunter.cmake
+++ /home/docs/checkouts/readthedocs.org/user_builds/hunter/checkouts/stable/docs/creating-new/hunter-NEW.cmake
@@ -19,6 +19,17 @@
     4fa7fe75629f148a61cedc6ba0bce74f177a6747
 )
 
+hunter_add_version(
+    PACKAGE_NAME
+    hunter_box_1
+    VERSION
+    1.0.1
+    URL
+    "https://github.com/hunterbox/hunter_box_1/archive/v1.0.1.tar.gz"
+    SHA1
+    10d046eec6c8b0aabd28bd3d1b99faf6beeb226b
+)
+
 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_cacheable(hunter_box_1)
 hunter_download(PACKAGE_NAME hunter_box_1)

Hint

Put new hunter_add_version at the bottom of file, diff will look prettier in this case.

Update default version in cmake/configs/default.cmake:

--- /home/docs/checkouts/readthedocs.org/user_builds/hunter/checkouts/stable/docs/creating-new/default.cmake
+++ /home/docs/checkouts/readthedocs.org/user_builds/hunter/checkouts/stable/docs/creating-new/default-NEW.cmake
@@ -181,7 +181,7 @@
 hunter_default_version(glproto VERSION 1.4.17)
 hunter_default_version(half VERSION 1.1.0-p1)
 hunter_default_version(hdf5 VERSION 1.8.15-p1)
-hunter_default_version(hunter_box_1 VERSION 1.0.0)
+hunter_default_version(hunter_box_1 VERSION 1.0.1)
 hunter_default_version(ice VERSION 1.0.8)
 hunter_default_version(imshow VERSION 1.0.0-p0)
 hunter_default_version(inputproto VERSION 2.2)

Commit changes:

[hunter]> git add cmake/projects/hunter_box_1/hunter.cmake
[hunter]> git add cmake/configs/default.cmake
[hunter]> git commit -m "Update 'hunter_box_1' to v1.0.1"

Test package

Hunter uses GitHub Actions for continuous integration testing. You can also test package building and documentation locally, however this is optional.

Testing will be performed automatically on pull request. To perform testing on push to yours Hunter fork, ensure that GitHub Actions are enabled for your repository - Managing GitHub Actions.

Package build testing will be performed for multiple platforms (different toolchains). If some toolchains are working and some toolchains failed it means the project has platform-specific problems. Note that you don’t have to have all toolchains working and there is no need to fix all issues you see. If at least documentation test is passing and some toolchain tests are working you can make a pull request and you or somebody else can apply fixes later.

If you’re sure that testing is failing due to system specific requirements and NOT due to package dependencies or platform specific code errors, or your package contains components and needs to perform some special tests with different examples - you can modify default build matrix and scripts.

Submit the pull request to Hunter

Once tests are passing, the package update in pr.hunter_box_1 should be pushed to your Hunter fork:

[hunter]> git push -u origin pr.hunter_box_1

Finally, a pull request should be opened to send the package update to the main Hunter repository, as illustrated in the previous section pull request screen shot (see example).