From f8573e84ccbd95e1206d330d51ea00dddd250cd6 Mon Sep 17 00:00:00 2001 From: Felix Becker Date: Sat, 4 Aug 2018 03:23:55 +0200 Subject: [PATCH] fix(license): replace placeholders --- src/cli.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cli.ts b/src/cli.ts index 57335ac7..d3186c47 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -136,7 +136,10 @@ async function main(): Promise { if (licenseName !== 'UNLICENSED') { console.log('📄 Adding LICENSE') const license = (await githubClient.get(`licenses/${licenseName}`)).body - await writeFile('LICENSE', license.body) + const licenseText = license.body + .replace(/\[year\]/g, new Date().getFullYear()) + .replace(/\[fullname\]/g, 'Sourcegraph') + await writeFile('LICENSE', licenseText) } const { hasTests } = await prompt<{ hasTests: boolean }>({