| #!/bin/bash |
| # Copyright 2016 The Vanadium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style |
| # license that can be found in the LICENSE file. |
| |
| # Generate assets.go by running go-bindata. |
| # The author did not expect this script to be invoked directly, |
| # instead it is expected to be invoked via: |
| # jiri go generate v.io/x/ref/services/allocator/allocatord |
| |
| set -euf -o pipefail |
| |
| # Install go-bindata |
| jiri go install github.com/jteeuwen/go-bindata/... |
| |
| DIR=$(dirname $0) |
| cd "${DIR}/assets" |
| OUT="assets.go" |
| TMP="assets.tmp.go" |
| |
| jiri run "${JIRI_ROOT}/third_party/go/bin/go-bindata" -o "${TMP}" -pkg assets -ignore '\.go$' -nometadata -mode 0644 . |
| jiri go fmt "${TMP}" >/dev/null |
| cat - "${TMP}" > "${OUT}" << EOF |
| // Copyright 2016 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| // Package assets contains template strings and other assets for the allocatord web interface. |
| // |
| // This package is auto-generated by "jiri go generate v.io/x/ref/services/allocator/allocatord" |
| // which in-turn uses https://github.com/jteeuwen/go-bindata/ |
| EOF |
| rm "${TMP}" |