diff --git a/build/custom.mk b/build/custom.mk index 86bd34d21..0efe683c6 100644 --- a/build/custom.mk +++ b/build/custom.mk @@ -1,6 +1,9 @@ # Include custom targets and environment variables here -ifndef MM_RUDDER_WRITE_KEY - MM_RUDDER_WRITE_KEY = 1d5bMvdrfWClLxgK1FvV3s4U1tg +# If there's no MM_RUDDER_PLUGINS_PROD, add DEV data +RUDDER_WRITE_KEY = 1d5bMvdrfWClLxgK1FvV3s4U1tg +ifdef MM_RUDDER_PLUGINS_PROD +RUDDER_WRITE_KEY = $(MM_RUDDER_PLUGINS_PROD) endif -GO_BUILD_FLAGS += -ldflags '-X "github.com/mattermost/mattermost-plugin-api/experimental/telemetry.rudderWriteKey=$(MM_RUDDER_WRITE_KEY)"' + +GO_BUILD_FLAGS += -ldflags '-X "github.com/mattermost/mattermost-plugin-api/experimental/telemetry.rudderWriteKey=$(RUDDER_WRITE_KEY)"'