function getVersion()

in scripts/updateVersion.ts [61:68]


function getVersion(filePath: string, regex: RegExp): string {
    const fileContents = readFileSync(filePath).toString();
    const match = fileContents.match(regex);
    if (!match) {
        throw new Error(`Failed to find match for "${regex.source}".`);
    }
    return match[1];
}