зеркало из https://github.com/mozilla/normandy.git
Auto-build vendor directory if it doesn't exist.
This commit is contained in:
Родитель
d3ad54e74c
Коммит
5424048621
|
@ -71,8 +71,9 @@ files:
|
|||
cd recipe-client-addon
|
||||
./bin/make-xpi.sh # Creates /recipe-client-addon/shield-recipe-client.xpi
|
||||
|
||||
Pass the ``-b``/``--build-vendor`` flag to auto-build vendor dependencies before
|
||||
creating the XPI.
|
||||
If the vendor directory hasn't been built, ``make-xpi.sh`` auto-builds it. Or,
|
||||
pass the ``-b``/``--build-vendor`` flag to force-build vendor dependencies
|
||||
before creating the XPI.
|
||||
|
||||
.. _recipe-client-sync:
|
||||
|
||||
|
@ -87,8 +88,9 @@ checkout of mozilla-central. The files that are copied over are determined by
|
|||
cd recipe-client-addon
|
||||
./bin/update-mozilla-central.sh /path/to/mozilla-central
|
||||
|
||||
Pass the ``-b``/``--build-vendor`` flag to auto-build vendor dependencies before
|
||||
copying the files to the checkout.
|
||||
If the vendor directory hasn't been built, ``update-mozilla-central.sh``
|
||||
auto-builds it. Or, pass the ``-b``/``--build-vendor`` flag to force-build
|
||||
vendor dependencies before copying files to the checkout.
|
||||
|
||||
.. _recipe-client-tests:
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ set -eu
|
|||
BASE_DIR="$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")"
|
||||
TMP_DIR=$(mktemp -d)
|
||||
DEST="${TMP_DIR}/shield-recipe-client"
|
||||
VENDOR_DIR="${BASE_DIR}/vendor"
|
||||
BUILD_VENDOR=false
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
|
@ -31,7 +32,7 @@ function cleanup {
|
|||
trap cleanup EXIT
|
||||
|
||||
# Build vendor files
|
||||
if [[ "$BUILD_VENDOR" = true ]]; then
|
||||
if [[ "$BUILD_VENDOR" = true || !(-d "$VENDOR_DIR") ]]; then
|
||||
pushd $BASE_DIR
|
||||
npm run build
|
||||
popd
|
||||
|
|
|
@ -4,6 +4,7 @@ set -eu
|
|||
|
||||
baseDir="$(dirname "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )")"
|
||||
mozCentral=""
|
||||
vendorDir="${baseDir}/vendor"
|
||||
buildVendor=false
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
|
@ -36,8 +37,8 @@ fi
|
|||
|
||||
rm -rf "${dest}"/*
|
||||
|
||||
# Build vendor files
|
||||
if [[ "$buildVendor" = true ]]; then
|
||||
# Build vendor files if enabled or if vendor doesn't exist yet
|
||||
if [[ "$buildVendor" = true || !(-d "$vendorDir") ]]; then
|
||||
pushd $baseDir
|
||||
npm run build
|
||||
popd
|
||||
|
|
Загрузка…
Ссылка в новой задаче