diff --git a/Makefile b/Makefile index 9b0184166be..7f8ac632e66 100644 --- a/Makefile +++ b/Makefile @@ -214,8 +214,8 @@ jaeger-ui/packages/jaeger-ui/build/index.html: .PHONY: rebuild-ui rebuild-ui: - cd jaeger-ui && yarn install --frozen-lockfile && cd packages/jaeger-ui && yarn build - + bash ./scripts/rebuild-ui.sh + .PHONY: build-all-in-one-linux build-all-in-one-linux: GOOS=linux $(MAKE) build-all-in-one diff --git a/scripts/rebuild-ui.sh b/scripts/rebuild-ui.sh new file mode 100644 index 00000000000..7134f47067a --- /dev/null +++ b/scripts/rebuild-ui.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -euxf -o pipefail + +cd jaeger-ui + +tag=$(git describe --exact-match --tags) +if [[ "$tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + temp_file=$(mktemp) + trap "rm -f ${temp_file}" EXIT + release_url="https://github.com/jaegertracing/jaeger-ui/releases/download/${tag}/assets.tar.gz" + if curl --silent --fail --location --output "$temp_file" "$release_url"; then + mkdir -p packages/jaeger-ui/build/ + tar -zxvf "$temp_file" packages/jaeger-ui/build/ + exit 0 + fi +fi + +# do a regular full build +yarn install --frozen-lockfile && cd packages/jaeger-ui && yarn build + + + + +