fix scripts npm

This commit is contained in:
Eugenio Romano 2019-08-29 20:14:31 +01:00
parent d7ff927b79
commit 6590b59de0
6 changed files with 16 additions and 18 deletions

View File

@ -149,6 +149,4 @@ deploy:
cache:
directories:
- node_modules
- demo-shell/dist
- tmp
- lib/dist

View File

@ -19,7 +19,6 @@
import { logging } from '@angular-devkit/core';
import { spawnSync } from 'child_process';
import * as path from 'path';
export interface PublishArgs {
tag?: string;
@ -71,7 +70,7 @@ function _tagImagePerform(args: PublishArgs, tag: string, logger: logging.Logger
logger.info(response);
}
function _pushImagePerform(args: PublishArgs, tag: string, logger: logging.Logger) {
function _pushImagePerform(args: PublishArgs, logger: logging.Logger) {
logger.info(`Perform docker push... ${args.dockerRepo}`);
const response = _exec('docker', ['push', `${args.dockerRepo}`], {}, logger);
logger.info(response);
@ -93,7 +92,7 @@ export default async function (args: PublishArgs, logger: logging.Logger) {
logger.info(`Analyzing tag:${tag} ...`);
_buildImagePerform(args, tag, logger);
_tagImagePerform(args, tag, logger);
_pushImagePerform(args, tag, logger);
_pushImagePerform(args, logger);
_cleanImagePerform(args, tag, logger);
logger.info(`tag:${tag} done`);
});

View File

@ -83,7 +83,7 @@ function _setImage(args: KubeArgs, logger: logging.Logger) {
logger.info(response);
}
function _installPerform(args: KubeArgs, logger: logging.Logger) {
function _installPerform(logger: logging.Logger) {
logger.info('Perform install...');
const responseK8sStable = _exec('curl', [`-s`, `https://storage.googleapis.com/kubernetes-release/release/stable.txt`], {}, logger).trim();
const k8sRelease = `https://storage.googleapis.com/kubernetes-release/release/${responseK8sStable}/bin/linux/amd64/kubectl`;
@ -92,7 +92,7 @@ function _installPerform(args: KubeArgs, logger: logging.Logger) {
export default async function (args: KubeArgs, logger: logging.Logger) {
if (args.installCheck === true) {
_installPerform(args, logger);
_installPerform(logger);
}
if (args.tag !== undefined) {
_setCluster(args, logger);

View File

@ -3,32 +3,31 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
echo "====== Run lib ====="
echo "====== Run extensions ====="
./build-extensions.sh
./build-extensions.sh || exit 1
echo "====== run core ====="
./build-core.sh
./build-core.sh || exit 1
echo "====== Run content-services ====="
./build-content-services.sh
./build-content-services.sh || exit 1
echo "====== Run process-services ====="
./build-process-services.sh
./build-process-services.sh || exit 1
echo "====== Run insights ====="
./build-insights.sh
./build-insights.sh || exit 1
echo "====== Run process-services-cloud ====="
./build-process-services-cloud.sh
./build-process-services-cloud.sh || exit 1
echo "====== Run testing ====="
./build-testing.sh
./build-testing.sh || exit 1
echo "====== Run Cli ====="
./build-cli.sh
./build-cli.sh || exit 1
echo "====== Copy schema ====="

View File

@ -68,4 +68,4 @@ if $EXEC_VERSION_JSAPI == true; then
fi
echo "====== Build components ====="
npm run build-lib || exit 1
./scripts/build/build-all-lib.sh

View File

@ -33,13 +33,15 @@ then
exit 0
fi
echo "The branch name to check is $BRANCH_NAME"
if $GNU; then
gnu='-gnu'
else
gnu=''
fi
if [ $BRANCH_NAME == 'undefined' ]; then
if [ $BRANCH_NAME == "undefined" ]; then
echo "Rebase your branch"
exit 1
fi