Skip to content

Commit

Permalink
[release-v1.10] Add kn-plugin-event custom ld flags (knative#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsimansk authored Oct 10, 2023
1 parent 115c600 commit 1fdb982
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions hack/build.sh.d/kn-plugin-event.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

knEventVersion="$(grep 'knative.dev/kn-plugin-event ' "$(basedir)/go.mod" \
| head -n 1 \
| sed -sE 's/.* (v[0-9]+\.[0-9]+\.[0-9]+.*)/\1/')"
knEventRelease="${knEventVersion%.*}"
knEventRelease="${knEventRelease#v}"
readonly upstream_sender_image="registry.ci.openshift.org/knative/release-${knEventRelease}:client-plugin-event-sender"
readonly sender_image="${KN_PLUGIN_EVENT_SENDER_IMAGE:-${upstream_sender_image}}"
export EXTERNAL_LD_FLAGS="${EXTERNAL_LD_FLAGS:-} \
-X knative.dev/kn-plugin-event/pkg/metadata.Image=${sender_image} \
-X knative.dev/kn-plugin-event/pkg/metadata.Version=${knEventVersion}"

0 comments on commit 1fdb982

Please sign in to comment.