mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
improve build and publish scripts
This commit is contained in:
parent
94273678df
commit
da67b6fa19
@ -85,7 +85,9 @@ function changeRegistry(args: PublishArgs, project: string) {
|
||||
`strict-ssl=false
|
||||
registry=http://${args.npmRegistry}
|
||||
//${args.npmRegistry}/:_authToken="${args.tokenRegistry}"`;
|
||||
|
||||
try {
|
||||
fs.mkdirSync(folder, { recursive: true });
|
||||
fs.writeFileSync(`${folder}/.npmrc`, content);
|
||||
} catch (e) {
|
||||
logger.error('Cannot write file', e);
|
||||
|
@ -10,15 +10,6 @@ npm i
|
||||
npm run dist
|
||||
|
||||
cd $DIR/../../
|
||||
if [ -e "./lib/dist/cli" ];
|
||||
then
|
||||
rm -rf "./lib/dist/cli" ;
|
||||
else if [ ! -d "./lib/dist" ];
|
||||
then
|
||||
mkdir ./lib/dist
|
||||
fi
|
||||
fi
|
||||
|
||||
cp -R ./lib/cli/dist lib/dist/cli/
|
||||
|
||||
echo "====== Move to node_modules ======"
|
||||
|
@ -17,7 +17,7 @@ then
|
||||
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)"
|
||||
npx @alfresco/adf-cli@alpha npm-publish --npmRegistry $NPM_REGISTRY_ADDRESS --tokenRegistry $NPM_REGISTRY_TOKEN --tag $TAG_NPM --pathProject "$(pwd)"
|
||||
else
|
||||
echo "PR No need to release in NPM"
|
||||
fi;
|
||||
|
Loading…
x
Reference in New Issue
Block a user