Maurizio Vitale 1fa81962a0
👽 Angular 14 rebase 👽 (#7769)
* fix after rebase

* new release strategy for ng next

Signed-off-by: eromano <eugenioromano16@gmail.com>

* peer dep

Signed-off-by: eromano <eugenioromano16@gmail.com>

* Angular 14

fix unit test and storybook

Signed-off-by: eromano <eugenioromano16@gmail.com>

fix after rebase

Signed-off-by: eromano <eugenioromano16@gmail.com>

update pkg.json

Signed-off-by: eromano <eugenioromano16@gmail.com>

missing dep

Signed-off-by: eromano <eugenioromano16@gmail.com>

Fix mistake and missing code

Dream....build only affected libs

Add utility run commands

* Use nx command to run affected tests

* Fix nx test core

fix content tests

Run unit with watch false

core test fixes

reduce test warnings

Fix process cloud unit

Fix adf unit test

Fix lint process cloud

Disable lint next line

Use right core path

Fix insights unit

fix linting insights

Fix process-services unit

fix the extensions test report

fix test warnings

Fix content unit

Fix bunch of content unit

* Produce an adf alpha of 14

* hopefully fixing the content

* Push back the npm publish

* Remove flaky unit

* Fix linting

* Make the branch as root

* Get rid of angualar13

* Remove the travis depth

* Fixing version for npm

* Enabling cache for unit and build

* Fix scss for core and paths

Copy i18 and asset by using ng-packager

Export the theming alias and fix path

Use ng-package to copy assets process-services-cloud

Use ng-package to copy assets process-services

Use ng-package to copy assets content-services

Use ng-package to copy assets insights

* feat: fix api secondary entry point

* fix storybook rebase

* Move dist under dist/libs from lib/dist

* Fix the webstyle

* Use only necessary nrwl deps and improve lint

* Fix unit for libs

* Convert lint.sh to targets - improve performance

* Use latest of angular

* Align alfresco-js-api

Signed-off-by: eromano <eugenioromano16@gmail.com>
Co-authored-by: eromano <eugenioromano16@gmail.com>
Co-authored-by: Mikolaj Serwicki <mikolaj.serwicki@hyland.com>
Co-authored-by: Tomasz <tomasz.gnyp@hyland.com>
2022-08-25 10:50:30 +01:00

94 lines
4.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# ===================================================================
# In this hook-file define only dynamic-ish environmental variables.
# Put the static environment variables into the env.yml file
# Command executions or any other installation logic
# is supposed to be in the "install.sh" hook script.
# ===================================================================
PARENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
# Settings for protractor-smartrunner -------------------------------------------------
export GIT_HASH=`git rev-parse HEAD`
# Node settings
export NODE_OPTIONS="--max_old_space_size=30000"
# Settings for Nx ---------------------------------------------------------------------
export BASE_HASH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)"
export HEAD_HASH="HEAD"
export HEAD_COMMIT_HASH=${TRAVIS_PULL_REQUEST_SHA:-${TRAVIS_COMMIT}}
export COMMIT_MESSAGE=`git log --format=%B -n 1 $HEAD_COMMIT_HASH`
#########################################################################################
# Settings based of Travis event type
#########################################################################################
if [ "${TRAVIS_EVENT_TYPE}" == "push" ]; then
# Settings for merges ---------------------------------------------------------------
if [[ "$TRAVIS_BRANCH" =~ ^master(-patch.*)?$ ]]; then
# into master(-patch*)
export NX_CALCULATION_FLAGS="--all"
export BUILD_OPTS="--configuration production"
elif [[ "$TRAVIS_BRANCH" =~ ^develop-patch.*$ ]]; then
# into develop-patch*
echo -e "\e[32mSetting up CI jobs for patch version creation.\e[0m"
export NX_CALCULATION_FLAGS="--all"
export BUILD_OPTS="--configuration production"
else
# into develop
export NX_CALCULATION_FLAGS="--base=$(git describe --tags `git rev-list --tags --max-count=1`) --head=$HEAD_HASH"
export BUILD_OPTS="--configuration production"
fi
elif [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then
# Settings for PRs ------------------------------------------------------------------
export NX_CALCULATION_FLAGS="--base=origin/$TRAVIS_BRANCH --head=$HEAD_HASH"
export BUILD_OPTS="--configuration production"
elif [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then
# Settings for Cron -----------------------------------------------------------------
export NX_CALCULATION_FLAGS="--all"
export BUILD_OPTS="--configuration production"
else
# Settings for API ------------------------------------------------------------------
export NX_CALCULATION_FLAGS="--all"
export BUILD_OPTS="--configuration production"
# In case of manual Travis run use the commit message from travis and not the one from git
COMMIT_MESSAGE=$TRAVIS_COMMIT_MESSAGE
fi
# Settings for S3 caching -------------------------------------------------------------
pip install --user awscli
if [ "${TRAVIS_EVENT_TYPE}" == "push" ]; then
echo "push"
elif [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then
echo "pull_request"
export BASE_HASH="origin/$TRAVIS_BRANCH"
source $PARENT_DIR/partials/_ci-flags-parser.sh
elif [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then
echo "cron"
else
echo "api"
fi
# Cache for protractor smart-runner
export S3_SMART_RUNNER_PATH="$S3_DBP_PATH/smart-runner/$TRAVIS_BUILD_ID"
# Cache for node_modules
export NODE_VERSION=`node -v`
export PACKAGE_LOCK_SHASUM=`shasum ./package-lock.json | cut -f 1 -d " "`
# This can change regardless of package-lock.json, so we need to calculate with this one as well
export S3_NODE_MODULES_CACHE_ID=`echo $NODE_VERSION-$PACKAGE_LOCK_SHASUM | shasum | cut -f 1 -d " "`
export S3_NODE_MODULES_CACHE_PATH="$S3_DBP_PATH/cache/node_modules/$S3_NODE_MODULES_CACHE_ID.tar.bz2"
echo "========== Caching settings =========="
echo "S3_SMART_RUNNER_PATH: $S3_SMART_RUNNER_PATH"
echo "PACKAGE_LOCK_SHASUM: $PACKAGE_LOCK_SHASUM"
echo "NODE_VERSION: $NODE_VERSION"
echo "S3_NODE_MODULES_CACHE_ID: $S3_NODE_MODULES_CACHE_ID"
echo "S3_NODE_MODULES_CACHE_PATH: $S3_NODE_MODULES_CACHE_PATH"
echo "========== Nx settings =========="
echo "GIT_HASH: $GIT_HASH"
echo "BASE_HASH: $BASE_HASH"
echo "HEAD_HASH: $HEAD_HASH"