simplify release tasks

This commit is contained in:
Eugenio Romano
2020-07-13 18:36:18 +01:00
parent 270020f561
commit 5edab26f8e
5 changed files with 9 additions and 62 deletions

View File

@@ -1,45 +0,0 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
eval NAME=
show_help() {
echo "Usage: test-dist.sh"
echo ""
echo "-n or --name pr name"
}
name(){
NAME="/$1"
}
while [[ $1 == -* ]]; do
case "$1" in
-h|--help|-\?) show_help; exit 0;;
-n|--name) name $2; shift 2;;
-*) echo "invalid option: $1" 1>&2; show_help; exit 0;;
esac
done
echo "====== Install lib ===== "
cd $DIR/../
npm install
echo "====== Install JS-API alpha ===== "
npm install alfresco-js-api@alpha
echo "====== Build ADF ===== "
npm run build-lib || exit 1
echo "====== Build dist demo shell ===== "
npm run server-versions
ng build dist --base-href=$NAME/ --output-path dist/demo-shell/$NAME || exit 1
echo "====== e2e test ===== "
npm run e2e || exit 1

View File

@@ -24,8 +24,7 @@ then
npm install
nx affected --exclude=cli --target=build --all || exit 1;
./scripts/build/build-cli.sh || exit 1;
./scripts/build/build-all-lib.sh
else
echo "====== Update the package.json with latest JS-API/CLI deps ====="
npx @alfresco/adf-cli@alpha update-version --alpha --pathPackage "$(pwd)"

View File

@@ -15,7 +15,9 @@ then
TAG_NPM=beta
fi
fi
fi;
echo "Publishing on npm with tag $TAG_NPM"
npx @alfresco/adf-cli npm-publish --npmRegistry $NPM_REGISTRY_ADDRESS --tokenRegistry $NPM_REGISTRY_TOKEN --tag $TAG_NPM --pathProject "$(pwd)"
echo "Publishing on npm with tag $TAG_NPM"
npx @alfresco/adf-cli npm-publish --npmRegistry $NPM_REGISTRY_ADDRESS --tokenRegistry $NPM_REGISTRY_TOKEN --tag $TAG_NPM --pathProject "$(pwd)"
else
echo "PR Not need to release in NPM"
fi;