Skip to content

Commit b1869ee

Browse files
enforce hugo version at runtime
1 parent 982ff29 commit b1869ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

etc/docs/build.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ async function updateSiteTemplateForNewVersion(
6767

6868
await writeFile(RELEASES_TOML_FILE, stringify(tomlData as any));
6969
await writeFile(RELEASES_JSON_FILE, JSON.stringify(jsonVersions, null, 4));
70-
7170
// generate the site from the template
7271
await exec(`hugo -s template -d ../temp -b "/node-mongodb-native"`);
7372
}
@@ -80,6 +79,9 @@ async function main() {
8079
process.exit(1);
8180
}
8281

82+
const { stdout } = await exec('hugo version', { encoding: 'utf8' });
83+
if (!stdout.includes('0.150.0')) throw new Error('`hugo` version must be 0.150.0.');
84+
8385
chdir(__dirname);
8486

8587
const { tag, status, skipPrompts } = getCommandLineArguments();

0 commit comments

Comments
 (0)