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

143 lines
2.9 KiB
Bash
Executable File

#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
eval VERSION=""
eval projects=( "adf-core"
"adf-insights"
"adf-content-services"
"adf-extensions"
"adf-testing"
"adf-process-services"
"adf-process-services-cloud" )
show_help() {
echo "Usage: npm-check-bundles.sh"
echo "-r or -registry to check -r 'http://npm.local.me:8080/' "
echo "-v or -version to check -v 1.4.0 "
echo ""
}
change_registry() {
echo $1
npm set registry $1
}
set_npm_registry() {
npm set registry https://registry.npmjs.org/
}
version() {
VERSION=$1
}
error_out() {
printf '\033[%sm%s\033[m\n' "$@"
# usage color "31;5" "string"
# 0 default
# 5 blink, 1 strong, 4 underlined
# fg: 31 red, 32 green, 33 yellow, 34 blue, 35 purple, 36 cyan, 37 white
# bg: 40 black, 41 red, 44 blue, 45 purple
}
while [[ $1 == -* ]]; do
case "$1" in
-h|--help|-\?) show_help; exit 0;;
-r) change_registry $2; shift 2;;
-v|--version) version $2; shift 2;;
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
esac
done
rm -rf temp
mkdir temp
cd temp
for PACKAGE in ${projects[@]}
do
mkdir $PACKAGE
cd $PACKAGE
npm pack '@alfresco/'$PACKAGE@$VERSION
tar zxf 'alfresco-'$PACKAGE-$VERSION.tgz
if [ $PACKAGE == 'adf-testing' ]; then
if [ ! -f package/'main.js' ]; then
error_out '31;1' "$PACKAGE testing not ok!" >&2
exit 1
else
echo "testing ok!"
fi
fi
if [ $PACKAGE == 'adf-core' ]; then
if [ ! -f package/lib/prebuilt-themes/'adf-blue-orange.css' ]; then
error_out '31;1' "$PACKAGE prebuilt-theme not found!" >&2
exit 1
else
echo "prebuilt-theme ok!"
fi
if [ ! -f package/'app.config.schema.json' ]; then
error_out '31;1' "$PACKAGE schema not found!" >&2
exit 1
else
echo "schema ok!"
fi
fi
if [ $PACKAGE != 'adf-testing' ]; then
if [ ! -f package/fesm2015/$PACKAGE'.mjs' ]; then
error_out '31;1' "fesm2015/$PACKAGE.mjs not found!" >&2
exit 1
else
echo "fesm2015 ok!"
fi
if [ ! -f package/esm2020/$PACKAGE'.mjs' ]; then
error_out '31;1' "esm2020/$PACKAGE.mjs not found!" >&2
exit 1
else
echo "esm2020 ok!"
fi
if [ ! -f package/fesm2020/$PACKAGE'.mjs' ]; then
error_out '31;1' "fesm2020/$PACKAGE.mjs not found!" >&2
exit 1
else
echo "fesm2020 ok!"
fi
if [ ! -f package/README.md ]; then
error_out '31;1' "$PACKAGE readme not found!" >&2
exit 1
else
echo "readme ok!"
fi
if [ ! -f package/bundles/assets/$PACKAGE/i18n/en.json ]; then
if [ $PACKAGE == 'adf-extensions' ]; then
echo "no i18n needed"
elif [ $PACKAGE == 'adf-testing' ]; then
echo "no i18n needed"
else
error_out '31;1' "$PACKAGE i18n not found!" >&2
exit 1
fi
else
echo "i18n ok!"
fi
fi
cd ..
done
cd ..
rm -rf temp
set_npm_registry