diff --git a/scripts/README.md b/scripts/README.md index 384fe85d54..c45b7c042d 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -3,7 +3,6 @@ - [Quick examples](#quick-examples) - [start.sh Demo shell script](#start.sh) -- [Ng2 components framework alfresco build](#npm-build-all.sh) The Alfresco application development framework comes with a demo project that you can run to get a feel of what's available. @@ -23,18 +22,6 @@ feel of what's available. ./start.sh -dev -gitjsapi development ``` -* Build the lib folder using the JS-API from the development branch - -```sh -./npm-build-all.sh -gitjsapi development -``` - -* Build the lib folder using the JS-API from the development branch and run the tests on it - -```sh -./npm-build-all.sh -t -gitjsapi development -``` - # start.sh ***start.sh*** script provide an easy way to deal with the npm command and the correct sequence to run the task on demo-shell during development phases. @@ -131,82 +118,6 @@ All the commands before can be used in combination ``` -# npm-build-all.sh - -***npm-build-all.sh*** this script provides an easy way to deal with the npm command and the correct sequence to build the lib - -## Options - -The default behaviour of the ***npm-build-all.sh*** install node_modules and build all the components - - -| Option | Description | -| --- | --- | -| -h or --help | show the help | -| -t or --test | Run the tests, this parameter accepts also a wildcard to execute tests for example -t "core" | -| -d or --debug | Run the tests **in browser**, this parameter accepts also a wildcard to execute tests for example -d "core" | -| -c or --clean | clean the ng2_components folders before start from all the temp builds files as node_modules | -| -gitjsapi | start the demo shell using an alfresco-js-api referenced by commit-ish version of the JS-API | -| -si or --skipinstall | skip the installation of the node_modules | -| -sb or --skipbuild | skip the creation of the bundles files and skip the errors and lint checks inside the components | - - -* Build all your local components: - -```sh -./npm-build-all.sh -``` - -* Build all your local components and run the tests: - -```sh -./npm-build-all.sh -t -``` - -* Build all your local components and run the tests **in BROWSER**: - -```sh -./npm-build-all.sh -d -``` - -* Build only a part of the component and run the tests only for a specific folder **in BROWSER**: -(you can change core with, any other lib in the lib folder) - -```sh -./npm-build-all.sh -si -sb -d "core" -``` - -* Clean the lib folder node_modules before build - -```sh -./npm-build-all.sh -c -``` - -* Build all the components against a commit-ish version of the JS-API - -```sh - ./npm-build-all.sh -gitjsapi commit-ish - - ./npm-build-all.sh -gitjsapi development - - ./npm-build-all.sh -gitjsapi de92be966e2ce7eca642ca9e9d7647ba4f849356 -``` - -* Skip initial build and run only all the test - -```sh -./npm-build-all.sh -s -t -``` - -* Skip initial installation of node_modules - -```sh -./npm-build-all.sh -si -``` - - -For development environment configuration please refer to [project docs](../demo-shell/README.md). - ***npm-check-bundles.sh*** check the bundles in the package npm are present ## Options diff --git a/scripts/ci/job_hooks/before_install.sh b/scripts/ci/job_hooks/before_install.sh index 7dffaff973..816a15e76a 100755 --- a/scripts/ci/job_hooks/before_install.sh +++ b/scripts/ci/job_hooks/before_install.sh @@ -22,7 +22,3 @@ fi echo "BASE_HASH: $BASE_HASH" echo "S3 DBP destination: $S3_DBP_FOLDER" - -export DISPLAY=:99.0 -sh -e /etc/init.d/xvfb start -sleep 3 # give xvfb some time to start diff --git a/scripts/npm-build-all.sh b/scripts/npm-build-all.sh deleted file mode 100755 index 1c9eff65de..0000000000 --- a/scripts/npm-build-all.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env bash -set -f - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -eval EXEC_GIT_NPM_INSTALL_JSAPI=false -eval GIT_ISH="" -eval EXEC_VERSION_JSAPI=false -eval JSAPI_VERSION="" - -eval projects=( "core" - "content-services" - "insights" - "testing" - "process-services" - "process-services-cloud" - "extensions" ) - -show_help() { - echo "Usage: npm-build-all.sh" - echo "" - echo "-gitjsapi Build all the components against a commit-ish version of the JS-API" - echo "-vjsapi Install different version from npm of JS-API defined in the package.json" -} - -enable_js_api_git_link() { - GIT_ISH='git://github.com/Alfresco/alfresco-js-api.git#'$1 - EXEC_GIT_NPM_INSTALL_JSAPI=true -} - -version_js_api() { - JSAPI_VERSION=$1 - - if [[ "${JSAPI_VERSION}" == "" ]] - then - echo "JSAPI version required with -vJSApi" - exit 0 - fi - - EXEC_VERSION_JSAPI=true -} - -exec_install(){ - EXEC_INSTALL=false -} - -while [[ $1 == -* ]]; do - case "$1" in - -h|--help|-\?) show_help; exit 0;; - -gitjsapi) enable_js_api_git_link $2; shift 2;; - -vjsapi) version_js_api $2; shift 2;; - -*) echo "invalid option: $1" 1>&2; show_help; exit 1;; - esac -done - -cd "$DIR/../" - -if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then - echo "====== Use the alfresco JS-API '$GIT_ISH'=====" - npm install $GIT_ISH --no-save - cd "$DIR/../node_modules/alfresco-js-api" - npm install - cd "$DIR/../" -fi - -if $EXEC_VERSION_JSAPI == true; then - echo "====== Use the alfresco JS-API '$JSAPI_VERSION'=====" - npm install alfresco-js-api@${JSAPI_VERSION} --no-save -fi - -echo "====== Build components =====" -./scripts/build/build-all-lib.sh diff --git a/scripts/travis/build/build.sh b/scripts/travis/build/build.sh index a1c4428d5b..036dfd5517 100755 --- a/scripts/travis/build/build.sh +++ b/scripts/travis/build/build.sh @@ -24,11 +24,11 @@ then npm install - ./scripts/npm-build-all.sh || exit 1; + nx affected --exclude=cli --target=build --all + ./scripts/build/build-cli.sh || exit 1; else - echo "====== Update the package.json with latest ADW deps =====" + echo "====== Update the package.json with latest JS-API/CLI deps =====" npx @alfresco/adf-cli@alpha update-version --alpha --pathPackage "$(pwd)" npm install; + nx affected --target=build --base=$BASE_HASH --head=$HEAD_HASH --exclude=cli --prod --with-deps fi; - -nx affected --target=build --base=$BASE_HASH --head=$HEAD_HASH --exclude=cli --prod --with-deps