Skip to content

Commit 94319ca

Browse files
committed
Make git version a config property
1 parent 3352dde commit 94319ca

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const examples = {
1616

1717
export default {
1818
defaults: { dirName: "my-stackbit-site", starter: starters[0] },
19+
minGitVersion: "2.25.0",
1920
examples,
2021
starters,
2122
};

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,9 @@ async function cloneExample() {
140140
);
141141
process.exit(1);
142142
}
143-
const minGitVersion = "2.25.0";
144-
if (compareVersion(gitVersionMatch[0], minGitVersion) < 0) {
143+
if (compareVersion(gitVersionMatch[0], config.minGitVersion) < 0) {
145144
console.error(
146-
`Starting from an example requires git version ${minGitVersion} or later.`,
145+
`Starting from an example requires git version ${config.minGitVersion} or later.`,
147146
"Please upgrade"
148147
);
149148
process.exit(1);

0 commit comments

Comments
 (0)