@opencrvs/create-countryconfig 2.0.2-rc.3152b53 → 2.0.2-rc.5bcf229
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/index.js +21 -14
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -151,7 +151,7 @@ function cloneRepository(
|
|
|
151
151
|
repoUrl,
|
|
152
152
|
ref,
|
|
153
153
|
targetDir,
|
|
154
|
-
{ keepHistory = false
|
|
154
|
+
{ keepHistory = false } = {}
|
|
155
155
|
) {
|
|
156
156
|
const depthFlag = keepHistory ? '' : '--depth 1 '
|
|
157
157
|
execSync(
|
|
@@ -179,18 +179,20 @@ function cloneRepository(
|
|
|
179
179
|
)
|
|
180
180
|
process.exit(1)
|
|
181
181
|
}
|
|
182
|
+
return
|
|
182
183
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
184
|
+
|
|
185
|
+
console.log(
|
|
186
|
+
"Replacing 'origin' remote with 'upstream' in " + targetDir + '...'
|
|
187
|
+
)
|
|
188
|
+
execSync('git remote remove origin', {
|
|
189
|
+
cwd: targetDir,
|
|
190
|
+
stdio: 'inherit'
|
|
191
|
+
})
|
|
192
|
+
execSync('git remote add upstream ' + repoUrl, {
|
|
193
|
+
cwd: targetDir,
|
|
194
|
+
stdio: 'inherit'
|
|
195
|
+
})
|
|
194
196
|
}
|
|
195
197
|
|
|
196
198
|
const projectName = process.argv[2]
|
|
@@ -262,8 +264,7 @@ console.log(
|
|
|
262
264
|
|
|
263
265
|
try {
|
|
264
266
|
cloneRepository(INFRASTRUCTURE_REPO_URL, ref, infrastructureDirName, {
|
|
265
|
-
keepHistory: true
|
|
266
|
-
replaceOriginWithUpstream: true
|
|
267
|
+
keepHistory: true
|
|
267
268
|
})
|
|
268
269
|
} catch (err) {
|
|
269
270
|
console.error('Failed to clone the infrastructure repository:', err.message)
|
|
@@ -279,3 +280,9 @@ console.log(' git init')
|
|
|
279
280
|
console.log(' npm install\n')
|
|
280
281
|
console.log('To get started with the infrastructure:\n')
|
|
281
282
|
console.log(' cd ' + infrastructureDirName)
|
|
283
|
+
console.log(' git remote add origin <your-infrastructure-repo-url>')
|
|
284
|
+
console.log(' git push -u origin ' + ref + '\n')
|
|
285
|
+
console.log(
|
|
286
|
+
'The "upstream" remote points at the official infrastructure repository, ' +
|
|
287
|
+
'so you can pull future releases with `git fetch upstream`.\n'
|
|
288
|
+
)
|