mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-13 06:47:28 -08:00
use npm workspace flag for the build instead of manually navigate through the folders (#10854)
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
This commit is contained in:
parent
542b9ecdbd
commit
e166cf402a
|
@ -14,28 +14,24 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
current=$(pwd)
|
|
||||||
if ! [[ -w $HOME ]]
|
if ! [[ -w $HOME ]]
|
||||||
then
|
then
|
||||||
export npm_config_cache=$(mktemp -d)
|
export npm_config_cache=$(mktemp -d)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
buildOrder=(module/lezer-promql module/codemirror-promql)
|
buildOrder=(lezer-promql codemirror-promql)
|
||||||
|
|
||||||
function buildModule() {
|
function buildModule() {
|
||||||
for module in "${buildOrder[@]}"; do
|
for module in "${buildOrder[@]}"; do
|
||||||
cd "${module}"
|
|
||||||
echo "build ${module}"
|
echo "build ${module}"
|
||||||
npm run build
|
npm run build -w "${module}"
|
||||||
cd "${current}"
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildReactApp() {
|
function buildReactApp() {
|
||||||
cd react-app
|
|
||||||
echo "build react-app"
|
echo "build react-app"
|
||||||
npm run build
|
npm run build -w react-app
|
||||||
cd "${current}"
|
|
||||||
rm -rf ./static/react
|
rm -rf ./static/react
|
||||||
mv ./react-app/build ./static/react
|
mv ./react-app/build ./static/react
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue