mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Remove the pathProject as mandatory (#6905)
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
import { exec } from './exec';
|
import { exec } from './exec';
|
||||||
import * as program from 'commander';
|
import * as program from 'commander';
|
||||||
import { logger } from './logger';
|
import { logger } from './logger';
|
||||||
|
import { resolve } from 'path';
|
||||||
|
|
||||||
export interface PublishArgs {
|
export interface PublishArgs {
|
||||||
tag?: string;
|
tag?: string;
|
||||||
@@ -71,15 +72,15 @@ function main(args) {
|
|||||||
program
|
program
|
||||||
.version('0.1.0')
|
.version('0.1.0')
|
||||||
.description('Move in the folder where you have your Dockerfile and run the command:\n\n' +
|
.description('Move in the folder where you have your Dockerfile and run the command:\n\n' +
|
||||||
'adf-cli docker-publish --dockerRepo "${docker_repository}" --dockerTags "${TAGS}" --pathProject "$(pwd)"')
|
'adf-cli docker-publish --dockerRepo "${docker_repository}" --dockerTags "${TAGS}"')
|
||||||
.option('--loginRepo [type]', 'URL registry')
|
.option('--loginRepo [type]', 'URL registry')
|
||||||
.option('--loginPassword [type]', ' password')
|
.option('--loginPassword [type]', ' password')
|
||||||
.option('--loginUsername [type]', ' username')
|
.option('--loginUsername [type]', ' username')
|
||||||
.option('--loginCheck [type]', 'perform login')
|
.option('--loginCheck [type]', 'perform login')
|
||||||
|
.option('--pathProject [type]', 'the path build context')
|
||||||
.requiredOption('--dockerRepo [type]', 'docker repo')
|
.requiredOption('--dockerRepo [type]', 'docker repo')
|
||||||
.requiredOption('--dockerTags [type]', ' tags')
|
.requiredOption('--dockerTags [type]', ' tags')
|
||||||
.requiredOption('--buildArgs [type]', ' buildArgs')
|
.requiredOption('--buildArgs [type]', ' buildArgs')
|
||||||
.requiredOption('--pathProject [type]', 'path project')
|
|
||||||
.parse(process.argv);
|
.parse(process.argv);
|
||||||
|
|
||||||
if (process.argv.includes('-h') || process.argv.includes('--help')) {
|
if (process.argv.includes('-h') || process.argv.includes('--help')) {
|
||||||
@@ -91,6 +92,10 @@ function main(args) {
|
|||||||
loginPerform(args);
|
loginPerform(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(args.pathProject === undefined) {
|
||||||
|
args.pathProject = resolve('./')
|
||||||
|
}
|
||||||
|
|
||||||
let mainTag;
|
let mainTag;
|
||||||
if (args.dockerTags !== '') {
|
if (args.dockerTags !== '') {
|
||||||
args.dockerTags.split(',').forEach( (tag, index) => {
|
args.dockerTags.split(',').forEach( (tag, index) => {
|
||||||
|
Reference in New Issue
Block a user