valent-pipeline 0.2.11 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/init.js +8 -0
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -29,6 +29,14 @@ export async function init(options = {}) {
|
|
|
29
29
|
|
|
30
30
|
console.log('\nInitializing valent-pipeline...\n');
|
|
31
31
|
|
|
32
|
+
// 0. Ensure git repo exists
|
|
33
|
+
if (!existsSync(join(projectRoot, '.git'))) {
|
|
34
|
+
console.log(' No git repository detected. Initializing...');
|
|
35
|
+
const { execSync } = await import('child_process');
|
|
36
|
+
execSync('git init', { cwd: projectRoot, stdio: 'pipe' });
|
|
37
|
+
console.log(' Initialized git repository');
|
|
38
|
+
}
|
|
39
|
+
|
|
32
40
|
// 1. Copy pipeline infrastructure
|
|
33
41
|
const pipelineSrc = join(PACKAGE_ROOT, 'pipeline');
|
|
34
42
|
const pipelineDest = join(projectRoot, '.valent-pipeline');
|