update
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
import 'typings-global'
|
||||
import * as plugins from './npmci.plugins'
|
||||
import * as paths from './npmci.paths'
|
||||
let npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot)
|
||||
|
@ -1,4 +1,3 @@
|
||||
import 'typings-global'
|
||||
import * as plugins from './npmci.plugins'
|
||||
|
||||
let nvmSourceString: string = ''
|
||||
|
@ -1,4 +1,3 @@
|
||||
import 'typings-global'
|
||||
import * as plugins from './npmci.plugins'
|
||||
import {bash} from './npmci.bash'
|
||||
import * as env from './npmci.env'
|
||||
|
@ -1,4 +1,3 @@
|
||||
import "typings-global";
|
||||
import * as plugins from "./npmci.plugins";
|
||||
import * as paths from "./npmci.paths"
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
import "typings-global";
|
||||
import * as plugins from "./npmci.plugins";
|
||||
import {bash} from "./npmci.bash";
|
||||
|
||||
|
@ -1,59 +1,58 @@
|
||||
import "typings-global";
|
||||
import * as plugins from "./npmci.plugins";
|
||||
import * as paths from "./npmci.paths";
|
||||
import {GitRepo} from "smartstring";
|
||||
import {Dockerfile} from "./npmci.build.docker"
|
||||
import * as plugins from './npmci.plugins'
|
||||
import * as paths from './npmci.paths'
|
||||
import {GitRepo} from 'smartstring'
|
||||
import {Dockerfile} from './npmci.build.docker'
|
||||
|
||||
export let repo:GitRepo;
|
||||
if(process.env.CI_BUILD_REPO) repo = new GitRepo(process.env.CI_BUILD_REPO);
|
||||
export let repo: GitRepo
|
||||
if (process.env.CI_BUILD_REPO) repo = new GitRepo(process.env.CI_BUILD_REPO)
|
||||
|
||||
export let buildStage:string = process.env.CI_BUILD_STAGE;
|
||||
export let buildStage: string = process.env.CI_BUILD_STAGE
|
||||
|
||||
// handling config between commands
|
||||
export let dockerRegistry:string; // will be set by npmci.prepare
|
||||
export let setDockerRegistry = (dockerRegistryArg:string) => {
|
||||
dockerRegistry = dockerRegistryArg;
|
||||
export let dockerRegistry: string // will be set by npmci.prepare
|
||||
export let setDockerRegistry = (dockerRegistryArg: string) => {
|
||||
dockerRegistry = dockerRegistryArg
|
||||
}
|
||||
export let dockerFilesBuilt:Dockerfile[] = [];
|
||||
export let dockerFiles:Dockerfile[] = [];
|
||||
export let dockerFilesBuilt: Dockerfile[] = []
|
||||
export let dockerFiles: Dockerfile[] = []
|
||||
export let config = {
|
||||
dockerRegistry: undefined, // this will be set later on store
|
||||
dockerFilesBuilt: dockerFilesBuilt,
|
||||
dockerFiles: dockerFiles,
|
||||
project: undefined
|
||||
};
|
||||
}
|
||||
|
||||
export let configStore = () => {
|
||||
config.dockerRegistry = dockerRegistry;
|
||||
config.dockerRegistry = dockerRegistry
|
||||
plugins.smartfile.memory.toFsSync(
|
||||
JSON.stringify(config),
|
||||
paths.NpmciPackageConfig
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
let configLoad = () => {
|
||||
// internal config to transfer information in between npmci shell calls
|
||||
try {
|
||||
plugins.lodash.assign(config,plugins.smartfile.fs.toObjectSync(paths.NpmciPackageConfig,"json"));
|
||||
plugins.lodash.assign(config,plugins.smartfile.fs.toObjectSync(paths.NpmciPackageConfig,'json'))
|
||||
}
|
||||
catch(err){
|
||||
configStore();
|
||||
plugins.beautylog.log("config initialized!");
|
||||
catch (err) {
|
||||
configStore()
|
||||
plugins.beautylog.log('config initialized!')
|
||||
}
|
||||
|
||||
// project config
|
||||
try {
|
||||
if(!config.project){
|
||||
config.project = plugins.smartfile.fs.toObjectSync(paths.NpmciProjectDir,"npmci.json");
|
||||
plugins.beautylog.ok("project config found!");
|
||||
if (!config.project) {
|
||||
config.project = plugins.smartfile.fs.toObjectSync(paths.NpmciProjectDir,'npmci.json')
|
||||
plugins.beautylog.ok('project config found!')
|
||||
};
|
||||
}
|
||||
catch(err){
|
||||
config.project = {};
|
||||
plugins.beautylog.log("no project config found, so proceeding with default behaviour!");
|
||||
catch (err) {
|
||||
config.project = {}
|
||||
plugins.beautylog.log('no project config found, so proceeding with default behaviour!')
|
||||
}
|
||||
|
||||
config.dockerRegistry ? dockerRegistry = config.dockerRegistry : void(0);
|
||||
config.dockerFilesBuilt ? dockerFilesBuilt = config.dockerFilesBuilt : void(0);
|
||||
|
||||
config.dockerRegistry ? dockerRegistry = config.dockerRegistry : void(0)
|
||||
config.dockerFilesBuilt ? dockerFilesBuilt = config.dockerFilesBuilt : void(0)
|
||||
}
|
||||
configLoad();
|
||||
configLoad()
|
||||
|
@ -1,4 +1,3 @@
|
||||
import 'typings-global'
|
||||
import * as plugins from './npmci.plugins'
|
||||
import * as configModule from './npmci.config'
|
||||
import { bash } from './npmci.bash'
|
||||
|
@ -1,4 +1,3 @@
|
||||
import 'typings-global'
|
||||
import * as plugins from './npmci.plugins'
|
||||
|
||||
export let cwd = process.cwd()
|
||||
|
@ -1,4 +1,3 @@
|
||||
import 'typings-global'
|
||||
export import beautylog = require('beautylog')
|
||||
export let gulp = require('gulp')
|
||||
export import gulpFunction = require('gulp-function')
|
||||
|
@ -1,4 +1,3 @@
|
||||
import 'typings-global'
|
||||
import * as plugins from './npmci.plugins'
|
||||
import {bash} from './npmci.bash'
|
||||
import * as env from './npmci.env'
|
||||
|
@ -1,4 +1,3 @@
|
||||
import 'typings-global'
|
||||
import * as plugins from './npmci.plugins'
|
||||
import {prepare} from './npmci.prepare'
|
||||
import {bash} from './npmci.bash'
|
||||
|
@ -1,4 +1,3 @@
|
||||
import 'typings-global'
|
||||
import * as plugins from './npmci.plugins'
|
||||
|
||||
let sshRegex = /^(.*)\|(.*)\|(.*)/
|
||||
|
@ -1,4 +1,3 @@
|
||||
import 'typings-global'
|
||||
import * as plugins from './npmci.plugins'
|
||||
import {bash} from './npmci.bash'
|
||||
import {install} from './npmci.install'
|
||||
|
@ -1,4 +1,3 @@
|
||||
import 'typings-global'
|
||||
import * as plugins from './npmci.plugins'
|
||||
import { prepare } from './npmci.prepare'
|
||||
import { bash } from './npmci.bash'
|
||||
|
Reference in New Issue
Block a user