Skip to content

Latest commit

 

History

History
79 lines (75 loc) · 2.49 KB

DEPLOY.md

File metadata and controls

79 lines (75 loc) · 2.49 KB

Steps to deploy

Preparation

  1. Run tests
    cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
    cmake --build build
    cd build && ctest
  2. Increase the CONFIGCAT_VERSION in src/version.h.
  3. Commit & Push

Publish

Use the same version for the git tag as in src/version.h.

  • Via git tag

    1. Create a new version tag.
      git tag v[MAJOR].[MINOR].[PATCH]

      Example: git tag v2.5.5

    2. Push the tag.
      git push origin --tags
  • Via Github release

    Create a new Github release with a new version tag and release notes.

Vcpkg Package

  • Fork the vcpkg repo on GitHub.
  • In the repo directory run ./bootstrap-vcpkg.sh.
  • Calculate SHA512 of the released .tar.gz file.
    • Download .tar.gz file
      wget https://github.com/configcat/cpp-sdk/archive/refs/tags/[GIT_TAG].tar.gz
    • Calculate SHA512
      ./vcpkg hash [GIT_TAG].tar.gz
  • Update the git tag and the SHA512 hash in the fork repo's ports/configcat/portfile.cmake file.
    vcpkg_from_github(
        OUT_SOURCE_PATH SOURCE_PATH
        REPO configcat/cpp-sdk
        REF [GIT_TAG]
        SHA512 [HASH]
        HEAD_REF master
    )
  • Update the version in the fork repo's ports/configcat/vcpkg.json file.
    {
        "name": "configcat",
        "version": "[CONFIGCAT_VERSION]",
        ...
    }
    
  • Commit & Push with commit message like [configcat] Update to version 2.5.5.
  • Run ./vcpkg x-add-version --all
  • Commit & Push with commit message like [configcat] Update to version 2.5.5.
  • Create a PR from the fork to vcpkg master branch. PR's title should be like [configcat] Update to version 2.5.5.
  • Make sure the PR is merged by the vcpkg team.

Update Example Projects

  • Get the new builtin-baseline hash from the vcpkg master branch. The builtin-baseline hash is the commit hash of the vcpkg repo when the PR was merged.
    git log --grep="configcat"

    Example: commit 877eaea99993eac466024d583eb720d717a3917b

  • Update the baseline hash in the samples/vcpkg.json file.
    {
      "name": "example",
      "dependencies": [
        "configcat"
      ],
      "builtin-baseline": "new-baseline-hash"
    }