blob: e6d782f8c27dfce155507172d59f4871caf6a99d [file] [log] [blame]
Dave Borowitz3aeefe32015-12-03 13:43:16 -05001#!/bin/bash
2# 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
18while [[ ! -f .buckconfig && "$PWD" != / ]]; do
19 cd ..
20done
21if [[ ! -f .buckconfig ]]; then
22 echo "$(basename "$0"): must be run from a gerrit checkout" 1>&2
23 exit 1
24fi
25
Viktar Donich5eb59e32016-03-15 10:56:06 -070026buck build \
27 //polygerrit-ui/app:test_components \
28 //polygerrit-ui:fonts
29
Urs Wolfer0f537c72016-03-30 20:01:33 +020030cd polygerrit-ui/app
Dave Borowitz3aeefe32015-12-03 13:43:16 -050031rm -rf bower_components
Urs Wolfer0f537c72016-03-30 20:01:33 +020032unzip -q ../../buck-out/gen/polygerrit-ui/app/test_components/test_components.bower_components.zip
Viktar Donich5eb59e32016-03-15 10:56:06 -070033rm -rf fonts
34unzip -q ../../buck-out/gen/polygerrit-ui/fonts/fonts.zip -d fonts
Urs Wolfer0f537c72016-03-30 20:01:33 +020035cd ..
36exec go run server.go "$@"