blob: fc542bb94cf658ea53a812ca26131db80b798874 [file] [log] [blame]
Viktar Donich508f81d2018-12-21 15:12:27 -08001#!/bin/sh
2
3if [[ -z "$1" ]]; then
4 echo This script injects plugins for *.googlesource.com.
5 echo Provide plugin paths, comma-separated, as a parameter.
6 echo This script assumes files do not have dependencies, i.e. minified.
7 exit 1
8fi
9
10realpath() {
11 [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
12}
13
14join () {
15 local IFS="$1"
16 shift
17 echo "$*"
18}
19
20plugins=$1
21plugin_paths=()
22for plugin in $(echo ${plugins} | sed "s/,/ /g")
23do
24 plugin_paths+=($(realpath ${plugin}))
25done
26
27absolute_plugin_paths=$(join , "${plugin_paths[@]}")
28
29mitm_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
30
31${mitm_dir}/dev-chrome.sh &
32
Viktar Donichfc299bc2019-04-08 13:03:10 -070033bazel build //polygerrit-ui/app:test_components &
34
35${mitm_dir}/mitm-docker.sh \
36 "serve-app-dev.py \
37 --plugins ${absolute_plugin_paths} \
38 --strip_assets \
39 --components $(pwd)/bazel-bin/polygerrit-ui/app/"