Skip to content

Commit

Permalink
Merge pull request #260 from ooni/issue/1879
Browse files Browse the repository at this point in the history
chore: use ooniprobe-cli 3.11.0-beta.2
  • Loading branch information
sarathms authored Dec 6, 2021
2 parents bd32e54 + f4b05fb commit cda481a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 26 deletions.
11 changes: 6 additions & 5 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ In order to start hacking on this, we assume you have `node` and `yarn`
installed.

Then you can run:
```

```bash
yarn install
```

Expand All @@ -65,9 +66,9 @@ yarn run start

## Update the translations

* Save the strings from the canonical spreadsheet into `data/lang-en.csv`
* Run `$ node scripts/update-translations.js`
* Commit `data/lang-en.csv`, `lang/*.json` and `renderer/static/translations.js`
- Save the strings from the canonical spreadsheet into `data/lang-en.csv`
- Run `$ node scripts/update-translations.js`
- Commit `data/lang-en.csv`, `lang/*.json` and `renderer/static/translations.js`
into git

## Build and sign macOS app
Expand All @@ -91,7 +92,7 @@ OONI_TEAMID=YWCG8FZTLT
where `TOKEN` is a [personal github token](https://github.com/settings/tokens/new)
with repository scope, `[email protected]` is the Apple ID you are using as part of our
team, `XXXX` is a password specific application created by visiting
https://appleid.apple.com and logging in as `[email protected]`, and
[appleid.apple.com](https://appleid.apple.com) and logging in as `[email protected]`, and
`YWCG8FZTLT` is the team ID used by OONI.

Then, run:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"author": "Open Observatory of Network Interference (OONI) <[email protected]>",
"productName": "OONI Probe",
"version": "3.6.1",
"probeVersion": "3.10.0-beta.3",
"probeVersion": "3.11.0-beta.2",
"main": "main/index.js",
"license": "BSD-3-Clause",
"repository": "ooni/probe-desktop",
Expand Down
37 changes: 17 additions & 20 deletions scripts/download-bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,25 @@ const dstDir = path.join(appRoot, 'build', 'probe-cli')

const download = () => {
ensureDirSync(dstDir)
const osarchlist = ['darwin_amd64', 'linux_amd64', 'windows_amd64']
for (let i = 0; i < osarchlist.length; i += 1) {
const osarch = osarchlist[i]
const tarball = `ooniprobe_${osarch}.tar.gz`
const tarballURL = `${baseURL}/${tarball}`
const sig = `${tarball}.asc`
const sigURL = `${tarballURL}.asc`
if (existsSync(`${dstDir}/${tarball}`) === false) {
console.log(`Downloading ${tarball}`)
execSync(`curl -#f -L -o ${dstDir}/${tarball} ${tarballURL}`)
}
if (existsSync(`${dstDir}/${sig}`) === false) {
console.log(`Downloading ${sig}`)
execSync(`curl -#f -L -o ${dstDir}/${sig} ${sigURL}`)
}
try {
execSync(`gpg --quiet --verify ${dstDir}/${sig} ${dstDir}/${tarball}`)
} catch (e) {
console.error(`Signature verification failure: ${e}`)
const osarchs = [
'darwin-amd64',
'linux-amd64',
'windows-amd64',
]
var osarch
for (osarch of osarchs) {
const extension = osarch.includes('windows') ? '.exe' : ''
const filename = `ooniprobe-${osarch}${extension}`
const fileURL = `${baseURL}/${filename}`
const versionedFilename = `${probeVersion}__${filename}`
if (existsSync(`${dstDir}/${versionedFilename}`) === false) {
console.log(`download ${versionedFilename}`)
execSync(`curl -#f -L -o ${dstDir}/${versionedFilename} ${fileURL}`)
}
osarch = osarch.replace('-', '_')
ensureDirSync(`${dstDir}/${osarch}`)
execSync(`cd ${dstDir}/${osarch} && tar xzf ../${tarball}`)
execSync(`cp ${dstDir}/${versionedFilename} ${dstDir}/${osarch}/ooniprobe${extension}`)
execSync(`chmod +x ${dstDir}/${osarch}/ooniprobe${extension}`)
}
}

Expand Down

0 comments on commit cda481a

Please sign in to comment.