blob: cbe3563e028248c1f356f3967f52969021d576e8 [file] [log] [blame]
Dan McGregorfeaee262016-11-29 07:41:27 -06001#!/usr/bin/env bash
Dave Borowitz3aeefe32015-12-03 13:43:16 -05002# Copyright (C) 2015 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16set -eu
17
David Ostrovskyfdbfcad2016-11-15 06:35:29 -080018while [[ ! -f WORKSPACE && "$PWD" != / ]]; do
Dave Borowitz3aeefe32015-12-03 13:43:16 -050019 cd ..
20done
David Ostrovskyfdbfcad2016-11-15 06:35:29 -080021if [[ ! -f WORKSPACE ]]; then
Dave Borowitz3aeefe32015-12-03 13:43:16 -050022 echo "$(basename "$0"): must be run from a gerrit checkout" 1>&2
23 exit 1
24fi
25
David Ostrovskyfdbfcad2016-11-15 06:35:29 -080026bazel build \
Viktar Donich8f5b9aa2017-01-24 13:57:15 -080027 //polygerrit-ui/app:test_components \
David Ostrovskyfdbfcad2016-11-15 06:35:29 -080028 //polygerrit-ui:fonts.zip
Viktar Donich5eb59e32016-03-15 10:56:06 -070029
Urs Wolfer0f537c72016-03-30 20:01:33 +020030cd polygerrit-ui/app
Dave Borowitz3aeefe32015-12-03 13:43:16 -050031rm -rf bower_components
Viktar Donich8f5b9aa2017-01-24 13:57:15 -080032unzip -q ../../bazel-bin/polygerrit-ui/app/test_components.zip
Viktar Donich5eb59e32016-03-15 10:56:06 -070033rm -rf fonts
David Ostrovskyfdbfcad2016-11-15 06:35:29 -080034unzip -q ../../bazel-bin/polygerrit-ui/fonts.zip -d fonts
Urs Wolfer0f537c72016-03-30 20:01:33 +020035cd ..
36exec go run server.go "$@"