Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v3.9.7 #339

Merged
merged 4 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "OONI Probe Desktop app",
"author": "Open Observatory of Network Interference (OONI) <[email protected]>",
"productName": "OONI Probe",
"version": "3.9.6",
"version": "3.9.7",
"probeVersion": "3.22.0",
"main": "main/index.js",
"license": "BSD-3-Clause",
Expand All @@ -18,7 +18,8 @@
"download": "yarn run download:tor && yarn run download:probe-cli",
"download:tor": "node scripts/download-tor.js",
"download:probe-cli": "node scripts/download-probe-cli.js",
"pack": "yarn run build:clean && electron-builder --win --mac --linux",
"pack": "yarn run build:clean && electron-builder --mac --linux -p never && electron-builder --dir --win -p never",
"packWin": "electron-builder --prepackaged ./dist/win-arm64-unpacked --win",
"pack:win": "yarn run build:clean && electron-builder --win --x64",
"pack:mac": "yarn run build:clean && electron-builder --mac",
"pack:linux": "yarn run build:clean && electron-builder --linux",
Expand Down
14 changes: 1 addition & 13 deletions scripts/download-probe-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,7 @@ const download = () => {
}
osarch = osarch.replace('-', '_')
ensureDirSync(`${dstDir}/${osarch}`)
if (osarch === 'windows_amd64') {
execSync(
`cp ${dstDir}/${versionedFilename} ${dstDir}/${osarch}/ooniprobe${extension}-unsigned`
)
execSync(
`osslsigncode sign -pkcs12 ${process.env.WIN_CSC_LINK} -pass ${process.env.WIN_CSC_KEY_PASSWORD} -n "OONI Probe CLI" -i https://ooni.org/ -in ${dstDir}/${osarch}/ooniprobe${extension}-unsigned -out ${dstDir}/${osarch}/ooniprobe${extension}`
)
execSync(`rm -rf ${dstDir}/${osarch}/ooniprobe${extension}-unsigned`)
} else {
execSync(
`cp ${dstDir}/${versionedFilename} ${dstDir}/${osarch}/ooniprobe${extension}`
)
}
execSync(`cp ${dstDir}/${versionedFilename} ${dstDir}/${osarch}/ooniprobe${extension}`)
execSync(`chmod +x ${dstDir}/${osarch}/ooniprobe${extension}`)
}
}
Expand Down
34 changes: 34 additions & 0 deletions scripts/hashFile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// copied from https://stackoverflow.com/a/60208623
const path = require('path')
const fs = require('fs')
const crypto = require('crypto')

const YOUR_FILE_PATH = './dist/OONI Probe Setup 3.9.7-rc.1.exe'

function hashFile(file, algorithm = 'sha512', encoding = 'base64', options) {
return new Promise((resolve, reject) => {
const hash = crypto.createHash(algorithm)
hash.on('error', reject).setEncoding(encoding)
fs.createReadStream(
file,
Object.assign({}, options, {
highWaterMark: 1024 * 1024,
/* better to use more memory but hash faster */
})
)
.on('error', reject)
.on('end', () => {
hash.end()
console.log('hash done')
console.log(hash.read())
resolve(hash.read())
})
.pipe(hash, {
end: false,
})
})
}

const installerPath = path.resolve(__dirname, YOUR_FILE_PATH)

hashFile(installerPath)
Loading