From 591d25dcd79a1a423a8653b65a52fece4a5cbc20 Mon Sep 17 00:00:00 2001 From: Rouel Joseph Soberano Date: Thu, 24 Aug 2023 18:01:15 -0700 Subject: [PATCH 1/8] build: adding slsa provenance generation to release-client workflow --- .github/actions/sdk-release/action.yml | 30 ++++++++++++++++++++++++++ .github/workflows/release-please.yml | 18 ++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/.github/actions/sdk-release/action.yml b/.github/actions/sdk-release/action.yml index 6e597f6a1..4db7afa3a 100644 --- a/.github/actions/sdk-release/action.yml +++ b/.github/actions/sdk-release/action.yml @@ -18,6 +18,16 @@ inputs: required: true sdk_cmake_target: description: 'CMake target of the sdk, e.g. launchdarkly-cpp-client.' +outputs: + hashes-linux: + description: "base64-encoded sha256 hash of linux build artifacts" + value: ${{ steps.hash-linux.outputs.hashes-linux }} + hashes-windows: + description: "base64-encoded sha256 hash of windows build artifacts" + value: ${{ steps.hash-windows.outputs.hashes-windows }} + hashes-macos: + description: "base64-encoded sha256 hash of macos build artifacts" + value: ${{ steps.hash-macos.outputs.hashes-macos }} runs: using: composite @@ -56,6 +66,12 @@ runs: type: 'zip' filename: 'linux-gcc-x64-dynamic.zip' + - name: Hash Linux Build Artifacts for provenance + if: runner.os == 'Linux' + shell: bash + id: hash-linux + run: | + echo "hashes-linux=$(sha256sum linux-gcc-x64-static.zip linux-gcc-x64-dynamic.zip | base64 -w0)" >> "$GITHUB_OUTPUT" - name: Upload Linux Build Artifacts if: runner.os == 'Linux' @@ -118,6 +134,13 @@ runs: type: 'zip' filename: 'windows-msvc-x64-dynamic-debug.zip' + - name: Hash Windows Build Artifacts for provenance + if: runner.os == 'Windows' + shell: bash + id: hash-windows + run: | + echo "hashes-windows=$(sha256sum windows-msvc-x64-static.zip windows-msvc-x64-dynamic.zip windows-msvc-x64-static-debug.zip windows-msvc-x64-dynamic-debug.zip | base64 -w0)" >> "$GITHUB_OUTPUT" + - name: Upload Windows Build Artifacts if: runner.os == 'Windows' shell: bash @@ -157,6 +180,13 @@ runs: type: 'zip' filename: 'mac-clang-x64-dynamic.zip' + - name: Hash Mac Build Artifacts for provenance + if: runner.os == 'macOS' + shell: bash + id: hash-macos + run: | + echo "hashes-macos=$(sha256sum mac-clang-x64-static.zip mac-clang-x64-dynamic.zip | base64 -w0)" >> "$GITHUB_OUTPUT" + - name: Upload Mac Build Artifacts if: runner.os == 'macOS' shell: bash diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 1fca13e90..57173d0d1 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -26,6 +26,10 @@ jobs: runs-on: ${{ matrix.os }} needs: [ 'release-please' ] if: ${{ needs.release-please.outputs.package-client-released }} + outputs: + hashes-linux: ${{ steps.release-client.outputs.hashes-linux }} + hashes-windows: ${{ steps.release-client.outputs.hashes-windows }} + hashes-macos: ${{ steps.release-client.outputs.hashes-macos }} steps: - uses: actions/checkout@v3 - id: release-client @@ -37,3 +41,17 @@ jobs: github_token: ${{secrets.GITHUB_TOKEN}} sdk_path: 'libs/client-sdk' sdk_cmake_target: 'launchdarkly-cpp-client' + + release-client-provenance: + needs: ['release-client'] + strategy: + matrix: + # Generates a combined attestation for each platform + os: [ linux, windows, macos ] + permissions: + actions: read + id-token: write + contents: write + uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.7.0 + with: + base64-subjects: "${{ needs.release-client.outputs[format('hashes-{0}', matrix.os)] }}" From ac23bb5c85904b7fe39843fb73bd1d089cb78a28 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 31 Aug 2023 17:18:09 -0700 Subject: [PATCH 2/8] chore: release main (#231) :robot: I have created a release *beep* *boop* ---
launchdarkly-cpp-client: 3.0.7 ## [3.0.7](https://github.com/launchdarkly/cpp-sdks/compare/launchdarkly-cpp-client-v3.0.6...launchdarkly-cpp-client-v3.0.7) (2023-08-31) ### Bug Fixes * allow for specification of initial reconnect delay in streaming data source ([#229](https://github.com/launchdarkly/cpp-sdks/issues/229)) ([d1dde79](https://github.com/launchdarkly/cpp-sdks/commit/d1dde79fde80cc32e19cf384140e138ce64ca02b)) ### Dependencies * The following workspace dependencies were updated * dependencies * launchdarkly-cpp-internal bumped from 0.1.7 to 0.1.8 * launchdarkly-cpp-common bumped from 0.3.4 to 0.3.5
launchdarkly-cpp-common: 0.3.5 ### Dependencies * The following workspace dependencies were updated * dependencies * launchdarkly-cpp-sse-client bumped from 0.1.1 to 0.1.2
launchdarkly-cpp-internal: 0.1.8 ### Dependencies * The following workspace dependencies were updated * dependencies * launchdarkly-cpp-common bumped from 0.3.4 to 0.3.5
launchdarkly-cpp-sse-client: 0.1.2 ## [0.1.2](https://github.com/launchdarkly/cpp-sdks/compare/launchdarkly-cpp-sse-client-v0.1.1...launchdarkly-cpp-sse-client-v0.1.2) (2023-08-31) ### Bug Fixes * allow for specification of initial reconnect delay in streaming data source ([#229](https://github.com/launchdarkly/cpp-sdks/issues/229)) ([d1dde79](https://github.com/launchdarkly/cpp-sdks/commit/d1dde79fde80cc32e19cf384140e138ce64ca02b))
--- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .release-please-manifest.json | 8 ++++---- libs/client-sdk/CHANGELOG.md | 15 +++++++++++++++ libs/client-sdk/CMakeLists.txt | 2 +- .../include/launchdarkly/client_side/client.hpp | 2 +- libs/client-sdk/package.json | 6 +++--- libs/client-sdk/tests/client_c_bindings_test.cpp | 2 +- libs/client-sdk/tests/client_test.cpp | 2 +- libs/common/CHANGELOG.md | 6 ++++++ libs/common/package.json | 4 ++-- libs/internal/CHANGELOG.md | 6 ++++++ libs/internal/package.json | 4 ++-- libs/server-sent-events/CHANGELOG.md | 7 +++++++ libs/server-sent-events/package.json | 2 +- 13 files changed, 50 insertions(+), 16 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index efd6372b6..99a6e064a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,6 +1,6 @@ { - "libs/client-sdk": "3.0.6", - "libs/server-sent-events": "0.1.1", - "libs/common": "0.3.4", - "libs/internal": "0.1.7" + "libs/client-sdk": "3.0.7", + "libs/server-sent-events": "0.1.2", + "libs/common": "0.3.5", + "libs/internal": "0.1.8" } diff --git a/libs/client-sdk/CHANGELOG.md b/libs/client-sdk/CHANGELOG.md index abfb3430f..839933b61 100644 --- a/libs/client-sdk/CHANGELOG.md +++ b/libs/client-sdk/CHANGELOG.md @@ -2,6 +2,21 @@ All notable changes to the LaunchDarkly Client-Side SDK for C/C++ will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org). +## [3.0.7](https://github.com/launchdarkly/cpp-sdks/compare/launchdarkly-cpp-client-v3.0.6...launchdarkly-cpp-client-v3.0.7) (2023-08-31) + + +### Bug Fixes + +* allow for specification of initial reconnect delay in streaming data source ([#229](https://github.com/launchdarkly/cpp-sdks/issues/229)) ([d1dde79](https://github.com/launchdarkly/cpp-sdks/commit/d1dde79fde80cc32e19cf384140e138ce64ca02b)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * launchdarkly-cpp-internal bumped from 0.1.7 to 0.1.8 + * launchdarkly-cpp-common bumped from 0.3.4 to 0.3.5 + ## [3.0.6](https://github.com/launchdarkly/cpp-sdks/compare/launchdarkly-cpp-client-v3.0.5...launchdarkly-cpp-client-v3.0.6) (2023-08-29) diff --git a/libs/client-sdk/CMakeLists.txt b/libs/client-sdk/CMakeLists.txt index 71fe99a09..bc26fd3e0 100644 --- a/libs/client-sdk/CMakeLists.txt +++ b/libs/client-sdk/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.19) project( LaunchDarklyCPPClient - VERSION 3.0.6 # {x-release-please-version} + VERSION 3.0.7 # {x-release-please-version} DESCRIPTION "LaunchDarkly C++ Client SDK" LANGUAGES CXX C ) diff --git a/libs/client-sdk/include/launchdarkly/client_side/client.hpp b/libs/client-sdk/include/launchdarkly/client_side/client.hpp index 50dd22549..b19d5f2c8 100644 --- a/libs/client-sdk/include/launchdarkly/client_side/client.hpp +++ b/libs/client-sdk/include/launchdarkly/client_side/client.hpp @@ -324,7 +324,7 @@ class Client : public IClient { private: inline static char const* const kVersion = - "3.0.6"; // {x-release-please-version} + "3.0.7"; // {x-release-please-version} std::unique_ptr client; }; diff --git a/libs/client-sdk/package.json b/libs/client-sdk/package.json index 7744ee229..5ded80e7f 100644 --- a/libs/client-sdk/package.json +++ b/libs/client-sdk/package.json @@ -1,10 +1,10 @@ { "name": "launchdarkly-cpp-client", "description": "This package.json exists for modeling dependencies for the release process.", - "version": "3.0.6", + "version": "3.0.7", "private": true, "dependencies": { - "launchdarkly-cpp-internal": "0.1.7", - "launchdarkly-cpp-common": "0.3.4" + "launchdarkly-cpp-internal": "0.1.8", + "launchdarkly-cpp-common": "0.3.5" } } diff --git a/libs/client-sdk/tests/client_c_bindings_test.cpp b/libs/client-sdk/tests/client_c_bindings_test.cpp index cc48fb1e1..b6a8e132f 100644 --- a/libs/client-sdk/tests/client_c_bindings_test.cpp +++ b/libs/client-sdk/tests/client_c_bindings_test.cpp @@ -27,7 +27,7 @@ TEST(ClientBindings, MinimalInstantiation) { char const* version = LDClientSDK_Version(); ASSERT_TRUE(version); - ASSERT_STREQ(version, "3.0.6"); // {x-release-please-version} + ASSERT_STREQ(version, "3.0.7"); // {x-release-please-version} LDClientSDK_Free(sdk); } diff --git a/libs/client-sdk/tests/client_test.cpp b/libs/client-sdk/tests/client_test.cpp index 2711e72b2..eaaf8bb31 100644 --- a/libs/client-sdk/tests/client_test.cpp +++ b/libs/client-sdk/tests/client_test.cpp @@ -16,7 +16,7 @@ TEST(ClientTest, ClientConstructedWithMinimalConfigAndContext) { char const* version = client.Version(); ASSERT_TRUE(version); - ASSERT_STREQ(version, "3.0.6"); // {x-release-please-version} + ASSERT_STREQ(version, "3.0.7"); // {x-release-please-version} } TEST(ClientTest, AllFlagsIsEmpty) { diff --git a/libs/common/CHANGELOG.md b/libs/common/CHANGELOG.md index 7e88c32cb..a2ea6cf8c 100644 --- a/libs/common/CHANGELOG.md +++ b/libs/common/CHANGELOG.md @@ -6,6 +6,12 @@ * dependencies * launchdarkly-cpp-sse-client bumped from 0.1.0 to 0.1.1 +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * launchdarkly-cpp-sse-client bumped from 0.1.1 to 0.1.2 + ## [0.3.4](https://github.com/launchdarkly/cpp-sdks/compare/launchdarkly-cpp-common-v0.3.3...launchdarkly-cpp-common-v0.3.4) (2023-08-28) diff --git a/libs/common/package.json b/libs/common/package.json index e40b38a50..e9620f3e8 100644 --- a/libs/common/package.json +++ b/libs/common/package.json @@ -1,9 +1,9 @@ { "name": "launchdarkly-cpp-common", "description": "This package.json exists for modeling dependencies for the release process.", - "version": "0.3.4", + "version": "0.3.5", "private": true, "dependencies": { - "launchdarkly-cpp-sse-client": "0.1.1" + "launchdarkly-cpp-sse-client": "0.1.2" } } diff --git a/libs/internal/CHANGELOG.md b/libs/internal/CHANGELOG.md index a25507822..2604969b5 100644 --- a/libs/internal/CHANGELOG.md +++ b/libs/internal/CHANGELOG.md @@ -34,6 +34,12 @@ * dependencies * launchdarkly-cpp-common bumped from 0.3.3 to 0.3.4 +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * launchdarkly-cpp-common bumped from 0.3.4 to 0.3.5 + ## [0.1.5](https://github.com/launchdarkly/cpp-sdks/compare/launchdarkly-cpp-internal-v0.1.4...launchdarkly-cpp-internal-v0.1.5) (2023-06-30) diff --git a/libs/internal/package.json b/libs/internal/package.json index 44bbe8768..347473bb0 100644 --- a/libs/internal/package.json +++ b/libs/internal/package.json @@ -1,9 +1,9 @@ { "name": "launchdarkly-cpp-internal", "description": "This package.json exists for modeling dependencies for the release process.", - "version": "0.1.7", + "version": "0.1.8", "private": true, "dependencies": { - "launchdarkly-cpp-common": "0.3.4" + "launchdarkly-cpp-common": "0.3.5" } } diff --git a/libs/server-sent-events/CHANGELOG.md b/libs/server-sent-events/CHANGELOG.md index c54d4c9f7..0f9ccce61 100644 --- a/libs/server-sent-events/CHANGELOG.md +++ b/libs/server-sent-events/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.1.2](https://github.com/launchdarkly/cpp-sdks/compare/launchdarkly-cpp-sse-client-v0.1.1...launchdarkly-cpp-sse-client-v0.1.2) (2023-08-31) + + +### Bug Fixes + +* allow for specification of initial reconnect delay in streaming data source ([#229](https://github.com/launchdarkly/cpp-sdks/issues/229)) ([d1dde79](https://github.com/launchdarkly/cpp-sdks/commit/d1dde79fde80cc32e19cf384140e138ce64ca02b)) + ## [0.1.1](https://github.com/launchdarkly/cpp-sdks/compare/launchdarkly-cpp-sse-client-v0.1.0...launchdarkly-cpp-sse-client-v0.1.1) (2023-06-30) diff --git a/libs/server-sent-events/package.json b/libs/server-sent-events/package.json index 5d976c49a..28aa9c992 100644 --- a/libs/server-sent-events/package.json +++ b/libs/server-sent-events/package.json @@ -2,6 +2,6 @@ "name": "launchdarkly-cpp-sse-client", "description": "This package.json exists for modeling dependencies for the release process.", "private": true, - "version": "0.1.1", + "version": "0.1.2", "dependencies": {} } From 32392c9cf711582034e44f730a8877535737b6b2 Mon Sep 17 00:00:00 2001 From: Casey Waldren Date: Fri, 1 Sep 2023 11:03:29 -0700 Subject: [PATCH 3/8] refactor: move sse-client package dep from common to client-sdk (#233) Currently we have: ``` client-sdk -> common -> sse-client ``` The `common` lib doesn't depend on `sse-client`, so this results in unnecessary `common` revisions. This commit makes `sse-client` a dependency of `client-sdk`. --- libs/client-sdk/package.json | 3 ++- libs/common/package.json | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/libs/client-sdk/package.json b/libs/client-sdk/package.json index 5ded80e7f..bf265049f 100644 --- a/libs/client-sdk/package.json +++ b/libs/client-sdk/package.json @@ -5,6 +5,7 @@ "private": true, "dependencies": { "launchdarkly-cpp-internal": "0.1.8", - "launchdarkly-cpp-common": "0.3.5" + "launchdarkly-cpp-common": "0.3.5", + "launchdarkly-cpp-sse-client": "0.1.2" } } diff --git a/libs/common/package.json b/libs/common/package.json index e9620f3e8..733c7153e 100644 --- a/libs/common/package.json +++ b/libs/common/package.json @@ -2,8 +2,5 @@ "name": "launchdarkly-cpp-common", "description": "This package.json exists for modeling dependencies for the release process.", "version": "0.3.5", - "private": true, - "dependencies": { - "launchdarkly-cpp-sse-client": "0.1.2" - } + "private": true } From 30e398173cd9858f075f04f6c49e83b50753b24d Mon Sep 17 00:00:00 2001 From: Rouel Joseph Soberano Date: Thu, 7 Sep 2023 10:34:12 -0700 Subject: [PATCH 4/8] fix: adding provenance generation to manual publish workflow --- .../workflows/manual-sdk-release-artifacts.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/manual-sdk-release-artifacts.yml b/.github/workflows/manual-sdk-release-artifacts.yml index fd55824cf..6d05a17ee 100644 --- a/.github/workflows/manual-sdk-release-artifacts.yml +++ b/.github/workflows/manual-sdk-release-artifacts.yml @@ -37,6 +37,10 @@ jobs: # Each of the platforms for which release-artifacts need generated. os: [ ubuntu-latest, windows-2022, macos-12 ] runs-on: ${{ matrix.os }} + outputs: + hashes-linux: ${{ steps.release-sdk.outputs.hashes-linux }} + hashes-windows: ${{ steps.release-sdk.outputs.hashes-windows }} + hashes-macos: ${{ steps.release-sdk.outputs.hashes-macos }} steps: - uses: actions/checkout@v3 with: @@ -50,3 +54,16 @@ jobs: github_token: ${{secrets.GITHUB_TOKEN}} sdk_path: ${{ needs.split-input.outputs.sdk_path}} sdk_cmake_target: ${{ needs.split-input.outputs.sdk_cmake_target}} + release-sdk-provenance: + needs: ['release-sdk'] + strategy: + matrix: + # Generates a combined attestation for each platform + os: [ linux, windows, macos ] + permissions: + actions: read + id-token: write + contents: write + uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.7.0 + with: + base64-subjects: "${{ needs.release-sdk.outputs[format('hashes-{0}', matrix.os)] }}" From d5ed567aa85731bb08678598832ac514ff22ec9e Mon Sep 17 00:00:00 2001 From: Casey Waldren Date: Thu, 7 Sep 2023 13:08:29 -0700 Subject: [PATCH 5/8] docs: fix some missing doxygen parameters (#236) Fixes a couple of doxygen complaints for parameter names. --- .../launchdarkly/bindings/c/context_builder.h | 27 +++++++------------ .../launchdarkly/bindings/c/object_builder.h | 2 +- .../include/launchdarkly/bindings/c/value.h | 2 +- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/libs/common/include/launchdarkly/bindings/c/context_builder.h b/libs/common/include/launchdarkly/bindings/c/context_builder.h index 9f013684f..6640b76f8 100644 --- a/libs/common/include/launchdarkly/bindings/c/context_builder.h +++ b/libs/common/include/launchdarkly/bindings/c/context_builder.h @@ -65,20 +65,21 @@ LDContextBuilder_AddKind(LDContextBuilder builder, char const* key); /** - * Add or update an attribute in the specified kind. + * Add or update a top-level attribute in the specified kind. * * Adding a LDValue to the builder will consume that value. * You should not access the value after adding it to the builder, and you * do not need to call LDValue_Free on the value. * + * @param builder. The builder. Must not be NULL. * @param kind The kind to add the attribute to. Must not be NULL. - * @param attr_key The key of the attribute to add. Must not be NULL. + * @param attr_name The name of the attribute to add. Must not be NULL. * @param val The value of the attribute to add. Must not be NULL. */ LD_EXPORT(bool) LDContextBuilder_Attributes_Set(LDContextBuilder builder, char const* kind, - char const* attr_key, + char const* attr_name, LDValue val); /** @@ -96,6 +97,7 @@ LDContextBuilder_Attributes_Set(LDContextBuilder builder, * convenience which also adds the attribute to the private attributes list, * as if using LDContextBuilder_Attributes_AddPrivateAttribute. * + * @param builder The builder. Must not be NULL. * @param kind The kind to set the private attribute for. Must not be NULL. * @param attr_key The key of the private attribute. Must not be NULL. * @param val The value of the private attribute. Must not be NULL. @@ -114,6 +116,7 @@ LDContextBuilder_Attributes_SetPrivate(LDContextBuilder builder, * This method will make a copy of the name string, and the caller remains * responsible for the original name string. * + * @param builder The builder. Must not be NULL. * @param kind The kind to set the name for. Must not be NULL. * @param name The name to set. Must not be NULL. */ @@ -128,6 +131,7 @@ LDContextBuilder_Attributes_SetName(LDContextBuilder builder, * If true, the context will _not_ appear on the Contexts page in the * LaunchDarkly dashboard. * + * @param builder The builder. Must not be NULL. * @param kind The kind to set the anonymous attribute for. Must not be NULL. * @param anonymous The value to set the anonymous attribute to. */ @@ -166,27 +170,14 @@ LDContextBuilder_Attributes_SetAnonymous(LDContextBuilder builder, * The attributes "kind" and "key", and the "_meta" attributes cannot be * made private. * - * In this example, firstName is marked as private, but lastName is not: - * - * ``` - * [TODO] - * ``` - * - * This is a metadata property, rather than an attribute that can be - * addressed in evaluations: that is, a rule clause that references the - * attribute name "privateAttributes", will not use this value, but would - * use a "privateAttributes" attribute set on the context. - * - * This method will make a copy of the attr_ref string, and the caller remains - * responsible for the original name string. - * + * @param builder The builder. Must not be NULL. * @param kind The kind to set the attribute as private for. Must not be NULL. * @param attr_ref An attribute reference. Must not be NULL. */ LD_EXPORT(bool) LDContextBuilder_Attributes_AddPrivateAttribute(LDContextBuilder builder, char const* kind, - char const* attr_key); + char const* attr_ref); #ifdef __cplusplus } #endif diff --git a/libs/common/include/launchdarkly/bindings/c/object_builder.h b/libs/common/include/launchdarkly/bindings/c/object_builder.h index 76dddf9cc..5fa3024d7 100644 --- a/libs/common/include/launchdarkly/bindings/c/object_builder.h +++ b/libs/common/include/launchdarkly/bindings/c/object_builder.h @@ -36,7 +36,7 @@ LD_EXPORT(void) LDObjectBuilder_Free(LDObjectBuilder builder); * be accessed, and the caller doesn't need to call LDValue_Free. The key will * be copied. * - * @param array_builder The object builder to add the value to. + * @param builder The object builder to add the value to. * @param key The key for the value being added. Must not be NULL. * @param val The value to add. Must not be NULL. */ diff --git a/libs/common/include/launchdarkly/bindings/c/value.h b/libs/common/include/launchdarkly/bindings/c/value.h index af63dcf4d..3072f561b 100644 --- a/libs/common/include/launchdarkly/bindings/c/value.h +++ b/libs/common/include/launchdarkly/bindings/c/value.h @@ -136,7 +136,7 @@ LD_EXPORT(void) LDValue_Free(LDValue val); /** * Returns the type of an LDValue. - * @param value LDValue to inspect. Must not be NULL. + * @param val LDValue to inspect. Must not be NULL. * @return Type of the LDValue, or LDValueType_Unrecognized if the type is * unrecognized. */ From 8bb3f55400f95fdaeb9c75ea9fa81bca3997a132 Mon Sep 17 00:00:00 2001 From: Rouel Joseph Soberano Date: Thu, 7 Sep 2023 14:00:56 -0700 Subject: [PATCH 6/8] fix: fixing shasum generation for macos artifacts --- .github/actions/sdk-release/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/sdk-release/action.yml b/.github/actions/sdk-release/action.yml index 4db7afa3a..e57d13ba3 100644 --- a/.github/actions/sdk-release/action.yml +++ b/.github/actions/sdk-release/action.yml @@ -185,7 +185,7 @@ runs: shell: bash id: hash-macos run: | - echo "hashes-macos=$(sha256sum mac-clang-x64-static.zip mac-clang-x64-dynamic.zip | base64 -w0)" >> "$GITHUB_OUTPUT" + echo "hashes-macos=$(sha256sum mac-clang-x64-static.zip mac-clang-x64-dynamic.zip | base64 -b 0)" >> "$GITHUB_OUTPUT" - name: Upload Mac Build Artifacts if: runner.os == 'macOS' From c422bd9e7de7f9cce9456fef2d03bc9aa4556764 Mon Sep 17 00:00:00 2001 From: Rouel Joseph Soberano Date: Thu, 7 Sep 2023 14:06:27 -0700 Subject: [PATCH 7/8] build: uploading provenance to Github release as well --- .github/workflows/manual-sdk-release-artifacts.yml | 2 ++ .github/workflows/release-please.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/manual-sdk-release-artifacts.yml b/.github/workflows/manual-sdk-release-artifacts.yml index 6d05a17ee..03b680cc0 100644 --- a/.github/workflows/manual-sdk-release-artifacts.yml +++ b/.github/workflows/manual-sdk-release-artifacts.yml @@ -67,3 +67,5 @@ jobs: uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.7.0 with: base64-subjects: "${{ needs.release-sdk.outputs[format('hashes-{0}', matrix.os)] }}" + upload-assets: true + upload-tag-name: ${{ inputs.tag }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 57173d0d1..9f83c43f7 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -55,3 +55,5 @@ jobs: uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.7.0 with: base64-subjects: "${{ needs.release-client.outputs[format('hashes-{0}', matrix.os)] }}" + upload-assets: true + upload-tag-name: ${{ needs.release-please.outputs.package-client-tag }} From 6876f69e1d47f9d39e6a2110b7af66f69e32923f Mon Sep 17 00:00:00 2001 From: Rouel Soberano <96156061+rsoberano-ld@users.noreply.github.com> Date: Fri, 8 Sep 2023 09:16:45 -0700 Subject: [PATCH 8/8] fix: fixing missing macos sha256sum command + provenance file name errors (#239) --- .github/actions/sdk-release/action.yml | 2 +- .github/workflows/manual-sdk-release-artifacts.yml | 1 + .github/workflows/release-please.yml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/sdk-release/action.yml b/.github/actions/sdk-release/action.yml index e57d13ba3..f6e789648 100644 --- a/.github/actions/sdk-release/action.yml +++ b/.github/actions/sdk-release/action.yml @@ -185,7 +185,7 @@ runs: shell: bash id: hash-macos run: | - echo "hashes-macos=$(sha256sum mac-clang-x64-static.zip mac-clang-x64-dynamic.zip | base64 -b 0)" >> "$GITHUB_OUTPUT" + echo "hashes-macos=$(shasum -a 256 mac-clang-x64-static.zip mac-clang-x64-dynamic.zip | base64 -b 0)" >> "$GITHUB_OUTPUT" - name: Upload Mac Build Artifacts if: runner.os == 'macOS' diff --git a/.github/workflows/manual-sdk-release-artifacts.yml b/.github/workflows/manual-sdk-release-artifacts.yml index 03b680cc0..d11df253b 100644 --- a/.github/workflows/manual-sdk-release-artifacts.yml +++ b/.github/workflows/manual-sdk-release-artifacts.yml @@ -69,3 +69,4 @@ jobs: base64-subjects: "${{ needs.release-sdk.outputs[format('hashes-{0}', matrix.os)] }}" upload-assets: true upload-tag-name: ${{ inputs.tag }} + provenance-name: ${{ format('{0}-multiple.intoto.jsonl', matrix.os) }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 9f83c43f7..17b91cd5b 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -57,3 +57,4 @@ jobs: base64-subjects: "${{ needs.release-client.outputs[format('hashes-{0}', matrix.os)] }}" upload-assets: true upload-tag-name: ${{ needs.release-please.outputs.package-client-tag }} + provenance-name: ${{ format('{0}-multiple.intoto.jsonl', matrix.os) }}