mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Exit1 in case the build fails (#3988)
This commit is contained in:
committed by
Eugenio Romano
parent
2a816d3b47
commit
f528d23aff
@@ -48,7 +48,7 @@ jobs:
|
||||
- npm install
|
||||
- ./scripts/lint.sh || exit 1
|
||||
- npm run spellcheck || exit 1
|
||||
- rm -rf tmp && (./scripts/smart-build.sh || exit 1;);
|
||||
- rm -rf tmp && (./scripts/smart-build.sh -b $TRAVIS_BRANCH || exit 1;);
|
||||
- npm run build:dist || exit 1
|
||||
- stage: Unit test
|
||||
name: core
|
||||
|
@@ -1,13 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
affected="$(./scripts/affected-libs.sh -b "$TRAVIS_BRANCH")"
|
||||
eval BRANCH_NAME=""
|
||||
|
||||
show_help() {
|
||||
echo "Usage: smart-build.sh"
|
||||
echo ""
|
||||
echo "-b branch name"
|
||||
}
|
||||
|
||||
branch_name(){
|
||||
BRANCH_NAME=$1
|
||||
}
|
||||
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$1" in
|
||||
-b) branch_name $2; shift 2;;
|
||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 0;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ "$BRANCH_NAME" == "" ]]
|
||||
then
|
||||
echo "The branch name is mandatory"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
affected="$(./scripts/affected-libs.sh -b "$BRANCH_NAME")"
|
||||
libs=(`echo $affected | sed 's/^$/\n/g'`)
|
||||
|
||||
#core
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "core$" ] ; then
|
||||
./scripts/build-core.sh
|
||||
./scripts/build-core.sh || exit 1;
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -15,7 +40,7 @@ done
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "content-services$" ] ; then
|
||||
./scripts/build-content-services.sh
|
||||
./scripts/build-content-services.sh || exit 1;
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -23,7 +48,7 @@ done
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "process-services$" ] ; then
|
||||
./scripts/build-process-services.sh
|
||||
./scripts/build-process-services.sh || exit 1;
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -31,7 +56,7 @@ done
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "process-services-cloud$" ] ; then
|
||||
./scripts/build-process-services-cloud.sh
|
||||
./scripts/build-process-services-cloud.sh || exit 1;
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -39,7 +64,7 @@ done
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "insights$" ] ; then
|
||||
./scripts/build-insights.sh
|
||||
./scripts/build-insights.sh || exit 1;
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -47,6 +72,6 @@ done
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "extensions$" ] ; then
|
||||
./scripts/build-extensions.sh
|
||||
./scripts/build-extensions.sh || exit 1;
|
||||
fi
|
||||
done
|
||||
|
Reference in New Issue
Block a user