#!/bin/bash set -e BUILD_DEBUG="${BUILD_DEBUG:-}" if [[ -n "${BUILD_DEBUG}" ]]; then set -x env fi cd $(dirname $0)/.. echo "Bootstrapping..." yarn --pure-lockfile install source scripts/version echo "BRANCH: ${COMMIT_BRANCH:-}" echo "TAG: ${GIT_TAG:-}" DIR=${GIT_TAG:-$COMMIT_BRANCH} # Rio is stuck pointing at the "master" folder, use "latest" instead. if [[ "${DIR}" == "master" ]]; then DIR="latest" fi BASE=https://releases.rancher.com/dashboard/${DIR} echo "Building for ${BASE}..." OUTPUT_DIR=dist/${DIR} ROUTER_BASE="/dashboard" RESOURCE_BASE="${BASE}" yarn run build --spa