fluffychat: 1.22.1 -> 1.23.0 (#364091)
[NixPkgs.git] / pkgs / by-name / za / zap-chip / dont-get-version-from-git.patch
blobec31cab794fc1ec19cd6727f1c737661c96542b1
1 diff --git a/src-script/script-util.js b/src-script/script-util.js
2 index 1897c2b8..aaf9a08b 100644
3 --- a/src-script/script-util.js
4 +++ b/src-script/script-util.js
5 @@ -196,23 +194,6 @@ async function rebuildBackendIfNeeded() {
6 * ads the timestamp and saves it into .version.json
7 */
8 async function stampVersion() {
9 - try {
10 - let out = await getStdout('{"hash": null,"date": null}', 'git', [
11 - 'log',
12 - '-1',
13 - '--format={"hash": "%H","timestamp": %ct}'
14 - ])
15 - let version = JSON.parse(out)
16 - let d = new Date(version.timestamp * 1000) // git gives seconds, Date needs milliseconds
17 - let result = await setPackageJsonVersion(d, 'real')
18 - version.date = d
19 - version.zapVersion = result.version
20 - let versionFile = path.join(__dirname, '../.version.json')
21 - console.log(`🔍 Git commit: ${version.hash} from ${version.date}`)
22 - await fsp.writeFile(versionFile, JSON.stringify(version))
23 - } catch (err) {
24 - console.log(`Error retrieving version: ${err}`)
25 - }
28 /**