Reorg script moving in folders (#4791)

* organize script in folder part 1

* improve test e2e

* fix smart build script

* fix relative path
This commit is contained in:
Eugenio Romano 2019-05-30 17:59:22 +01:00 committed by GitHub
parent cccd95562c
commit ce60915fd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 22 additions and 67 deletions

View File

@ -18,7 +18,7 @@
"01s": "",
"unit-test": "concurrently \"ng test content-services --watch=false\" \"ng test process-services --watch=false\" \"ng test core --watch=false\" \"ng test extensions --watch=false\" \"ng test insights --watch=false\" \"ng test process-services-cloud --watch=false\" ",
"prepublishOnly": "npm run build-lib",
"build-lib": "./scripts/ng-packagr.sh",
"build-lib": "./scripts/build/build-all-lib.sh",
"bundlesize-check": "bundlesize",
"affected:libs": "./node_modules/.bin/nx affected:libs",
"webpack-bundle-analyzer": "webpack-bundle-analyzer demo-shell/dist/stats.json",

View File

@ -4,7 +4,6 @@
- [Quick examples](#quick-examples)
- [start.sh Demo shell script](#start.sh)
- [Ng2 components framework alfresco build](#npm-build-all.sh)
- [Clean components and Demo](#npm-clean.sh)
The Alfresco application development framework comes with a demo project that you can run to get a
feel of what's available.
@ -205,26 +204,9 @@ The default behaviour of the ***npm-build-all.sh*** install node_modules and bui
./npm-build-all.sh -si
```
* Clean all your local components and the demo shell:
```sh
./npm-clean.sh
```
For development environment configuration please refer to [project docs](../demo-shell/README.md).
# npm-clean.sh
***npm-clean.sh*** clean all the projects folders : lib and demo-shell.
## Options
| Option | Description |
| --- | --- |
| -h or --help | show the help |
# npm-check-bundles.sh
***npm-check-bundles.sh*** check the bundles in the package npm are present
## Options

View File

@ -29,6 +29,6 @@ echo "====== Run testing ====="
echo "====== Copy schema ====="
cp ../lib/core/app-config/schema.json ../lib/dist/core/app.config.schema.json
cp ../../lib/core/app-config/schema.json ../../lib/dist/core/app.config.schema.json
npm run bundlesize-check

View File

@ -2,7 +2,7 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/..
cd $DIR/../..
echo "====== Content Services ======"
echo "====== Build ======"

View File

@ -2,7 +2,7 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/..
cd $DIR/../..
echo "====== Core ======"
echo "====== Build ======"

View File

@ -2,7 +2,7 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/..
cd $DIR/../..
echo "====== Extensions ======"
echo "====== Build ======"

View File

@ -2,7 +2,7 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/..
cd $DIR/../..
echo "====== Insights ======"
echo "====== Build ======"

View File

@ -2,7 +2,7 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/..
cd $DIR/../..
echo "====== Process Services Cloud ======"
echo "====== Build ======"

View File

@ -2,7 +2,7 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/..
cd $DIR/../..
echo "====== Process Services ======"
echo "====== Build ======"

View File

@ -2,7 +2,7 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/..
cd $DIR/../..
echo "====== Testing ======"
echo "====== Build ======"

View File

@ -1,25 +0,0 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
eval EXEC_CLEAN_DEMO=true
show_help() {
echo "Usage: npm-clean.sh"
echo ""
}
while [[ $1 == -* ]]; do
case "$1" in
-h|--help|-\?) show_help; exit 0;;
-*) echo "invalid option: $1" 1>&2; show_help; exit 0;;
esac
done
npm install rimraf
cd "$DIR/../"
npm run clean-lock
npm run clean
cd ${DIR}

View File

@ -11,7 +11,7 @@ eval projects=( "@alfresco/adf-core"
"@alfresco/adf-extensions" )
show_help() {
echo "Usage: npm-clean.sh"
echo "Usage: npm-move-tag.sh"
echo ""
echo "-v version package to apply new tag"
echo "-t new tag name to add"

View File

View File

@ -48,7 +48,7 @@ libs=(`echo $affected | sed 's/^$/\n/g'`)
for i in "${libs[@]}"
do
if [ "$i" == "extensions$" ] ; then
./scripts/build-extensions.sh || exit 1;
./scripts/build/build-extensions.sh || exit 1;
fi
done
@ -56,7 +56,7 @@ done
for i in "${libs[@]}"
do
if [ "$i" == "core$" ] ; then
./scripts/build-core.sh || exit 1;
./scripts/build/build-core.sh || exit 1;
fi
done
@ -64,7 +64,7 @@ done
for i in "${libs[@]}"
do
if [ "$i" == "content-services$" ] ; then
./scripts/build-content-services.sh || exit 1;
./scripts/build/build-content-services.sh || exit 1;
fi
done
@ -72,7 +72,7 @@ done
for i in "${libs[@]}"
do
if [ "$i" == "process-services$" ] ; then
./scripts/build-process-services.sh || exit 1;
./scripts/build/build-process-services.sh || exit 1;
fi
done
@ -80,7 +80,7 @@ done
for i in "${libs[@]}"
do
if [ "$i" == "process-services-cloud$" ] ; then
./scripts/build-process-services-cloud.sh || exit 1;
./scripts/build/build-process-services-cloud.sh || exit 1;
fi
done
@ -88,7 +88,7 @@ done
for i in "${libs[@]}"
do
if [ "$i" == "insights$" ] ; then
./scripts/build-insights.sh || exit 1;
./scripts/build/build-insights.sh || exit 1;
fi
done
@ -96,6 +96,6 @@ done
for i in "${libs[@]}"
do
if [ "$i" == "testing$" ] ; then
./scripts/build-testing.sh || exit 1;
./scripts/build/build-testing.sh || exit 1;
fi
done

View File

@ -91,7 +91,7 @@ set_timeout(){
}
set_save_screenshot(){
SAVE_SCREENSHOT=true
export SAVE_SCREENSHOT=true
}
set_development(){
@ -124,7 +124,7 @@ lite_server(){
}
max_instances(){
MAXINSTANCES=$1
export MAXINSTANCES=$1
}
disable_control_flow(){
@ -176,12 +176,10 @@ done
rm -rf ./e2e/downloads/
rm -rf ./e2e-output/screenshots/
export SAVE_SCREENSHOT=$SAVE_SCREENSHOT
export TIMEOUT=$TIMEOUT
export SELENIUM_SERVER=$SELENIUM_SERVER
export MAXINSTANCES=$MAXINSTANCES
export SELENIUM_PROMISE_MANAGER=$SELENIUM_PROMISE_MANAGER
if $EXEC_VERSION_JSAPI == true; then

View File

@ -6,10 +6,10 @@ cd $DIR/../../../
#if [ "$TRAVIS_PULL_REQUEST" != "false" ];
#then
node ./scripts/move-dist-folder.js --base-href $TRAVIS_BUILD_NUMBER && (./scripts/pr-publish.sh -n $TRAVIS_BUILD_NUMBER -r $REPO_DOCKER -u $USERNAME_DOCKER -p $PASSWORD_DOCKER || exit 1);
node ./scripts/travis/deploy/move-dist-folder.js --base-href $TRAVIS_BUILD_NUMBER && (./scripts/travis/deploy/pr-publish.sh -n $TRAVIS_BUILD_NUMBER -r $REPO_DOCKER -u $USERNAME_DOCKER -p $PASSWORD_DOCKER || exit 1);
#fi;
#if [ "$TRAVIS_PULL_REQUEST" != "false" ];
#then
(node --no-deprecation ./scripts/pr-deploy.js -n $TRAVIS_BUILD_NUMBER -u $RANCHER_TOKEN -p $RANCHER_SECRET -s $REPO_RANCHER --image "docker:$REPO_DOCKER/adf/demo-shell:$TRAVIS_BUILD_NUMBER" --env $ENVIRONMENT_NAME -r $ENVIRONMENT_URL || exit 1);
(node --no-deprecation ./scripts/travis/deploy/pr-deploy.js -n $TRAVIS_BUILD_NUMBER -u $RANCHER_TOKEN -p $RANCHER_SECRET -s $REPO_RANCHER --image "docker:$REPO_DOCKER/adf/demo-shell:$TRAVIS_BUILD_NUMBER" --env $ENVIRONMENT_NAME -r $ENVIRONMENT_URL || exit 1);
#fi;