diff --git a/lib/upstream.js b/lib/upstream.js index eeed0a0..237908c 100644 --- a/lib/upstream.js +++ b/lib/upstream.js @@ -39,8 +39,11 @@ async function getUpstreamRegistry(repoUrl) { // checkout each historical version: const versionsDups = await [ headLog, ...oldSchemaLogs ].reduce(async (aProm, log, i) => { const a = await aProm - const [ hash, commitUnixTime ] = log.split(' ') // see "%h %at"above + const [ hash, _ ] = log.split(' ') // see "%h %at"above await execFile('git', [ "checkout", hash ], { cwd: REPO_PATH, error: die }) + const commitUnixTime = (await execFile('git', [ + 'log', '-1', '--pretty=format:%at', '--', path.join(DATA_PATH, `${name}.json`) + ], { cwd: REPO_PATH, error: die })).stdout const data = JSON.parse(await readFile(path.join(DATA_PATH, `${name}.json`))) const { $id } = JSON.parse(await readFile(path.join(SCHEMA_PATH, schemaFile))) const schemaVersion = path.basename($id)