mirror of https://github.com/rancher/dashboard.git
30 lines
675 B
Bash
Executable File
30 lines
675 B
Bash
Executable File
#!/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:-<none>}"
|
|
echo "TAG: ${GIT_TAG:-<none>}"
|
|
DIR=${GIT_TAG:-$COMMIT_BRANCH}
|
|
|
|
# Rio is stuck pointing at the "master" folder, use "latest" instead.
|
|
if [[ "${DIR}" == "master" ]]; then
|
|
DIR="latest"
|
|
fi
|
|
|
|
BASE=${BASE:-https://releases.rancher.com/dashboard/${DIR}}
|
|
|
|
echo "Building for ${BASE}..."
|
|
|
|
NUXT_ENV_commit=${COMMIT} NUXT_ENV_version=${VERSION} OUTPUT_DIR=dist/${DIR} ROUTER_BASE="/dashboard" RESOURCE_BASE="${BASE}" yarn run build --spa
|