mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
* make the local link build fast and run the test only if asked #1588 * demo core doesn't exist * link after install * move in after success matrix build and install scripts
This commit is contained in:
committed by
Denys Vuika
parent
2f3aeb84a1
commit
d739526517
@@ -44,7 +44,13 @@ in the demo shell:
|
||||
* If you want to build all your local component:
|
||||
|
||||
```sh
|
||||
./npm-buid-alll.sh
|
||||
./npm-buid-all.sh
|
||||
```
|
||||
|
||||
* If you want to build all your local component and run the test:
|
||||
|
||||
```sh
|
||||
./npm-buid-alll.sh -test
|
||||
```
|
||||
|
||||
* If you want clean all your local component and the demo shell:
|
||||
|
@@ -1,13 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
eval RUN_TEST=false
|
||||
|
||||
show_help() {
|
||||
echo "Usage: npm-build-all.sh"
|
||||
echo ""
|
||||
echo "-t or -test build all your local component and run also the test on them"
|
||||
}
|
||||
|
||||
enable_test(){
|
||||
RUN_TEST=true
|
||||
}
|
||||
|
||||
build_project() {
|
||||
cd $1
|
||||
echo "====== build project: $2 ====="
|
||||
npm install
|
||||
npm build
|
||||
if $RUN_TEST == true; then
|
||||
npm run test
|
||||
fi
|
||||
}
|
||||
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$1" in
|
||||
-h|--help|-\?) show_help; exit 0;;
|
||||
-t|--test) enable_test; shift;;
|
||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
for PACKAGE in \
|
||||
ng2-alfresco-core \
|
||||
ng2-activiti-diagrams \
|
||||
|
@@ -9,7 +9,6 @@ npm install
|
||||
|
||||
#LINK ALL THE OTHERS COMPONENTS
|
||||
for PACKAGE in \
|
||||
ng2-alfresco-core \
|
||||
ng2-alfresco-datatable \
|
||||
ng2-activiti-diagrams \
|
||||
ng2-activiti-analytics \
|
||||
@@ -30,5 +29,4 @@ do
|
||||
cd "$DESTDIR/demo"
|
||||
npm link ${PACKAGE}
|
||||
npm travis
|
||||
npm install
|
||||
done
|
||||
|
@@ -25,6 +25,6 @@ do
|
||||
echo "====== PUBLISHING: ${DESTDIR} ====="
|
||||
cd ${DESTDIR}
|
||||
npm install
|
||||
npm publish
|
||||
npm run publish:prod
|
||||
cd ${DIR}
|
||||
done
|
||||
|
@@ -37,18 +37,19 @@ eval OPTIONS=$1
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$1" in
|
||||
-l|--link) link; shift;;
|
||||
-*) shift;;
|
||||
-*) shift;;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
while [[ $OPTIONS == -* ]]; do
|
||||
shift $(expr $OPTIND - 1 )
|
||||
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$OPTIONS" in
|
||||
-h|--help|-\?) show_help; exit 0;;
|
||||
-i|--install) install; shift;;
|
||||
-u|--update) update; shift;;
|
||||
-c|--cleanInstall) cleanInstall; shift;;
|
||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
||||
-*) shift;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user