This repository has been archived by the owner on Jun 20, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
114 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ test/data/tmp/ | |
web/ | ||
.github | ||
codeqldb | ||
*.js | ||
scripts/ | ||
*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"productName": "Standard Notes", | ||
"description": "An end-to-end encrypted notes app for digitalists and professionals.", | ||
"author": "Standard Notes <[email protected]>", | ||
"version": "3.20.0", | ||
"version": "3.20.1", | ||
"main": "./dist/index.js", | ||
"dependencies": { | ||
"keytar": "^7.9.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
import { execSync } from 'child_process'; | ||
|
||
(async () => { | ||
const version = process.argv[2]; | ||
import { execSync } from 'child_process' | ||
;(async () => { | ||
const version = process.argv[2] | ||
if (!version) { | ||
console.error('Must specify a version number.'); | ||
process.exitCode = 1; | ||
return; | ||
console.error('Must specify a version number.') | ||
process.exitCode = 1 | ||
return | ||
} | ||
execSync(`yarn version --no-git-tag-version --new-version ${version}`); | ||
process.chdir('app'); | ||
execSync(`yarn version --no-git-tag-version --new-version ${version}`); | ||
process.chdir('..'); | ||
execSync('git add package.json app/package.json'); | ||
execSync(`git commit -m "chore(version): ${version}"`); | ||
})(); | ||
execSync(`yarn version --no-git-tag-version --new-version ${version}`) | ||
process.chdir('app') | ||
execSync(`yarn version --no-git-tag-version --new-version ${version}`) | ||
process.chdir('..') | ||
execSync('git add package.json app/package.json') | ||
execSync(`git commit -m "chore(version): ${version}"`) | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
import crypto from 'crypto'; | ||
import fs from 'fs'; | ||
import { getLatestBuiltFilesList } from './utils.mjs'; | ||
import crypto from 'crypto' | ||
import fs from 'fs' | ||
import { getLatestBuiltFilesList } from './utils.mjs' | ||
|
||
function sha256(filePath) { | ||
return new Promise((resolve, reject) => { | ||
fs.createReadStream(filePath) | ||
.pipe(crypto.createHash('sha256').setEncoding('hex')) | ||
.on('finish', function () { | ||
resolve(this.read()); | ||
resolve(this.read()) | ||
}) | ||
.on('error', reject); | ||
}); | ||
.on('error', reject) | ||
}) | ||
} | ||
|
||
(async () => { | ||
console.log('Writing SHA256 sums to dist/SHA256SUMS'); | ||
;(async () => { | ||
console.log('Writing SHA256 sums to dist/SHA256SUMS') | ||
|
||
try { | ||
const files = await getLatestBuiltFilesList(); | ||
const files = await getLatestBuiltFilesList() | ||
|
||
process.chdir('dist'); | ||
process.chdir('dist') | ||
|
||
let hashes = await Promise.all( | ||
files.map(async (fileName) => { | ||
const hash = await sha256(fileName); | ||
return `${hash} ${fileName}`; | ||
}) | ||
); | ||
hashes = hashes.join('\n'); | ||
await fs.promises.writeFile('SHA256SUMS', hashes); | ||
console.log(`Successfully wrote SHA256SUMS:\n${hashes}`); | ||
const hash = await sha256(fileName) | ||
return `${hash} ${fileName}` | ||
}), | ||
) | ||
hashes = hashes.join('\n') | ||
await fs.promises.writeFile('SHA256SUMS', hashes) | ||
console.log(`Successfully wrote SHA256SUMS:\n${hashes}`) | ||
} catch (err) { | ||
console.error(err); | ||
process.exitCode = 1; | ||
console.error(err) | ||
process.exitCode = 1 | ||
} | ||
})(); | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.