Comparing version 0.18.1 to 0.19.0
@@ -61,7 +61,8 @@ exports.command = 'create <name>'; | ||
files: '*/**', | ||
after: ['skeleton-v2'] | ||
after: '*' | ||
}; | ||
mappingConfigs[`_skeleton-v2`] = { | ||
files: '*/**' | ||
files: '*/**', | ||
before: '*' | ||
}; | ||
@@ -68,0 +69,0 @@ |
@@ -49,3 +49,3 @@ const path = require('path'); | ||
} else { | ||
config = await super.readConfig(); | ||
const defaultConfig = await super.readConfig(); | ||
@@ -57,10 +57,22 @@ // overwrite from environment | ||
if (envValue) { | ||
const [url, ref] = envValue.split('#'); | ||
const envMatch = envValue.match(/^(?<url>[^#=]+)?(#(?<ref>[^=]+)(=>(?<holobranch>.*))?)?$/); | ||
config = Object.create(config); | ||
config.url = url; | ||
if (!envMatch) { | ||
throw new Error(`unable to parse ${envName} value: ${envValue}`); | ||
} | ||
const { url, ref, holobranch } = envMatch.groups; | ||
config = Object.create(defaultConfig); | ||
if (url) { | ||
config.url = url; | ||
} | ||
if (ref) { | ||
config.ref = ref; | ||
config.project = holobranch ? { holobranch } : null; | ||
} | ||
} else { | ||
config = defaultConfig; | ||
} | ||
@@ -286,3 +298,3 @@ } | ||
const { ref: specRef } = await this.getCachedSpec(); | ||
const headRef = `${specRef}/${ref.substr(5)}`; | ||
const headRef = `${specRef}/${ref.substr(5)}`; // TODO: should this be 0, 5? | ||
const resolvedRef = await repo.resolveRef(headRef); | ||
@@ -289,0 +301,0 @@ |
{ | ||
"name": "hologit", | ||
"version": "0.18.1", | ||
"version": "0.19.0", | ||
"description": "Hologit automates the projection of layered composite file trees based on flat, declarative plans", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/EmergencePlatform/hologit", |
132627
3020