Skip to content

Commit

Permalink
Reorg script moving in folders (Alfresco#4791)
Browse files Browse the repository at this point in the history
* organize script in folder part 1

* improve test e2e

* fix smart build script

* fix relative path
  • Loading branch information
eromano authored May 30, 2019
1 parent cccd955 commit ce60915
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 67 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
18 changes: 0 additions & 18 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/ng-packagr.sh → scripts/build/build-all-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ echo "====== Run process-services-cloud ====="
./build-process-services-cloud.sh

echo "====== Run testing ====="
./build-testing.sh
./build-testing.sh

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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

cd $DIR/..
cd $DIR/../..

echo "====== Content Services ======"
echo "====== Build ======"
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-core.sh → scripts/build/build-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

cd $DIR/..
cd $DIR/../..

echo "====== Core ======"
echo "====== Build ======"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

cd $DIR/..
cd $DIR/../..

echo "====== Extensions ======"
echo "====== Build ======"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

cd $DIR/..
cd $DIR/../..

echo "====== Insights ======"
echo "====== Build ======"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

cd $DIR/..
cd $DIR/../..

echo "====== Process Services Cloud ======"
echo "====== Build ======"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

cd $DIR/..
cd $DIR/../..

echo "====== Process Services ======"
echo "====== Build ======"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

cd $DIR/..
cd $DIR/../..

echo "====== Testing ======"
echo "====== Build ======"
Expand Down
File renamed without changes.
File renamed without changes.
25 changes: 0 additions & 25 deletions scripts/npm-clean.sh

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/npm-move-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Empty file removed scripts/pr-undeploy.sh
Empty file.
14 changes: 7 additions & 7 deletions scripts/smart-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,54 +48,54 @@ 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

#core
for i in "${libs[@]}"
do
if [ "$i" == "core$" ] ; then
./scripts/build-core.sh || exit 1;
./scripts/build/build-core.sh || exit 1;
fi
done

#content-services
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

#process-services
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

#process-services-cloud
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

#insights
for i in "${libs[@]}"
do
if [ "$i" == "insights$" ] ; then
./scripts/build-insights.sh || exit 1;
./scripts/build/build-insights.sh || exit 1;
fi
done

#testing
for i in "${libs[@]}"
do
if [ "$i" == "testing$" ] ; then
./scripts/build-testing.sh || exit 1;
./scripts/build/build-testing.sh || exit 1;
fi
done
6 changes: 2 additions & 4 deletions scripts/test-e2e-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ set_timeout(){
}

set_save_screenshot(){
SAVE_SCREENSHOT=true
export SAVE_SCREENSHOT=true
}

set_development(){
Expand Down Expand Up @@ -124,7 +124,7 @@ lite_server(){
}

max_instances(){
MAXINSTANCES=$1
export MAXINSTANCES=$1
}

disable_control_flow(){
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/travis/deploy/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ce60915

Please sign in to comment.