Skip to content

Commit 1b821c6

Browse files
authored
Merge pull request #266 from cipherstash/build/include-more-info-in-cipherstash-client-user-agent
build: send version string on requests to ZeroKMS/CTS
2 parents 2a25ba5 + 1aa8d9a commit 1b821c6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mise.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,14 @@ if [[ "{{option(name="target", default=default_target)}}" =~ "linux" ]]; then
552552
fi
553553
{% endif %}
554554
555+
# set a user agent
556+
if [[ -n "${GITHUB_REF_NAME}" ]]; then
557+
export BUILD_VERSION="${GITHUB_REF_NAME}"
558+
else
559+
export BUILD_VERSION="$(git rev-parse HEAD)$(git diff-index --quiet HEAD -- || echo '+untracked')"
560+
fi
561+
export CIPHERSTASH_CLIENT_SECONDARY_USER_AGENT="cipherstash-proxy/${BUILD_VERSION}"
562+
555563
# cross-compile
556564
rustup update
557565
rustup target add --toolchain stable {{ target }}

0 commit comments

Comments
 (0)