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
|
`strict-ssl=false
|
||||||
registry=http://${args.npmRegistry}
|
registry=http://${args.npmRegistry}
|
||||||
//${args.npmRegistry}/:_authToken="${args.tokenRegistry}"`;
|
//${args.npmRegistry}/:_authToken="${args.tokenRegistry}"`;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
fs.mkdirSync(folder, { recursive: true });
|
||||||
fs.writeFileSync(`${folder}/.npmrc`, content);
|
fs.writeFileSync(`${folder}/.npmrc`, content);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.error('Cannot write file', e);
|
logger.error('Cannot write file', e);
|
||||||
|
@ -10,15 +10,6 @@ npm i
|
|||||||
npm run dist
|
npm run dist
|
||||||
|
|
||||||
cd $DIR/../../
|
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/
|
cp -R ./lib/cli/dist lib/dist/cli/
|
||||||
|
|
||||||
echo "====== Move to node_modules ======"
|
echo "====== Move to node_modules ======"
|
||||||
|
@ -17,7 +17,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Publishing on npm with tag $TAG_NPM"
|
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
|
else
|
||||||
echo "PR No need to release in NPM"
|
echo "PR No need to release in NPM"
|
||||||
fi;
|
fi;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user