mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-18 19:44:06 -08:00
54dfee02b2
* move codemirror-promql as a prometheus web module Signed-off-by: Augustin Husson <husson.augustin@gmail.com> * remove unecessary file for the codemirror module Signed-off-by: Augustin Husson <husson.augustin@gmail.com> * change license for Apache Signed-off-by: Augustin Husson <husson.augustin@gmail.com> * fix codemirror build Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
61 lines
888 B
Bash
Executable file
61 lines
888 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
MODULE_LIST=(codemirror-promql)
|
|
|
|
build-module() {
|
|
for module in "${MODULE_LIST[@]}"; do
|
|
cd "${module}"
|
|
echo "building ${module}"
|
|
npm run build
|
|
cd ../
|
|
done
|
|
}
|
|
|
|
lint-module() {
|
|
for module in "${MODULE_LIST[@]}"; do
|
|
cd "${module}"
|
|
echo "running linter for ${module}"
|
|
npm run lint
|
|
cd ../
|
|
done
|
|
}
|
|
|
|
test-module() {
|
|
for module in "${MODULE_LIST[@]}"; do
|
|
cd "${module}"
|
|
echo "running all tests for ${module}"
|
|
npm run test
|
|
cd ../
|
|
done
|
|
}
|
|
|
|
install-module(){
|
|
for module in "${MODULE_LIST[@]}"; do
|
|
cd "${module}"
|
|
echo "install deps for ${module}"
|
|
npm ci
|
|
cd ../
|
|
done
|
|
}
|
|
|
|
for i in "$@"; do
|
|
case ${i} in
|
|
--build)
|
|
build-module
|
|
shift
|
|
;;
|
|
--lint)
|
|
lint-module
|
|
shift
|
|
;;
|
|
--test)
|
|
test-module
|
|
;;
|
|
--install)
|
|
install-module
|
|
;;
|
|
esac
|
|
done
|