blob: 0428e4055a0609d527b2ee9a3137935b4dc7281f [file] [log] [blame]
#!/bin/bash
#
# This script runs a server using local PolyGerrit resources and
# live production data.
#
# Usage: Invoke with no arguments, optionally with the environment
# variables set to change behavior, e.g.
# GERRIT_HOST=gerrit-review.googlesource.com GERRIT_DIR=~/gerrit <script name>
set -eu
readonly SCRIPT_DIR=$(realpath "$(dirname "${0}")")
readonly GERRIT_DIR=$(realpath "${GERRIT_DIR:-${SCRIPT_DIR}/../..}")
readonly PLUGINS_PATH=$(realpath --relative-to="$GERRIT_DIR" "$SCRIPT_DIR/..")
readonly GERRIT_HOST="${GERRIT_HOST:-webrtc-review.googlesource.com}"
(set -x &&
cd "${GERRIT_DIR}" &&
polygerrit-ui/run-server.sh --plugins="$PLUGINS_PATH" --host="$GERRIT_HOST")