Dave Borowitz | 3aeefe3 | 2015-12-03 13:43:16 -0500 | [diff] [blame] | 1 | #!/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 | |
| 16 | set -eu |
| 17 | |
| 18 | while [[ ! -f .buckconfig && "$PWD" != / ]]; do |
| 19 | cd .. |
| 20 | done |
| 21 | if [[ ! -f .buckconfig ]]; then |
| 22 | echo "$(basename "$0"): must be run from a gerrit checkout" 1>&2 |
| 23 | exit 1 |
| 24 | fi |
| 25 | |
Viktar Donich | 5eb59e3 | 2016-03-15 10:56:06 -0700 | [diff] [blame] | 26 | buck build \ |
| 27 | //polygerrit-ui/app:test_components \ |
| 28 | //polygerrit-ui:fonts |
| 29 | |
Urs Wolfer | 0f537c7 | 2016-03-30 20:01:33 +0200 | [diff] [blame] | 30 | cd polygerrit-ui/app |
Dave Borowitz | 3aeefe3 | 2015-12-03 13:43:16 -0500 | [diff] [blame] | 31 | rm -rf bower_components |
Urs Wolfer | 0f537c7 | 2016-03-30 20:01:33 +0200 | [diff] [blame] | 32 | unzip -q ../../buck-out/gen/polygerrit-ui/app/test_components/test_components.bower_components.zip |
Viktar Donich | 5eb59e3 | 2016-03-15 10:56:06 -0700 | [diff] [blame] | 33 | rm -rf fonts |
| 34 | unzip -q ../../buck-out/gen/polygerrit-ui/fonts/fonts.zip -d fonts |
Urs Wolfer | 0f537c7 | 2016-03-30 20:01:33 +0200 | [diff] [blame] | 35 | cd .. |
| 36 | exec go run server.go "$@" |