Skip to content

Commit b312f25

Browse files
committed
download older versions to test
1 parent c724e2c commit b312f25

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

measure/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A simple react native app with some performance benchmarks.
44

5-
#### Past measurements are saved into [results](/results.json)
5+
#### Past measurements are saved into [results](/measure/results.json)
66
The table blow is generated by calling `npm run generateReadmeTable`
77

88

measure/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"android": "cd android && ./gradlew clean uninstallRelease installRelease",
77
"androidi18n": "npm run android -- --project-prop i18n=true",
88
"start": "node ./scripts/measure",
9-
"generateReadmeTable": "node ./scripts/resultsJsonToMarkdown"
9+
"generateReadmeTable": "node ./scripts/resultsJsonToMarkdown",
10+
"downloadPublishedVersion": "node ./scripts/downloadPublishedVersion"
1011
},
1112
"dependencies": {
1213
"react-native": "0.44.0",
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const _ = require('lodash');
2+
const exec = require('shell-utils').exec;
3+
4+
const version = process.argv.splice(process.execArgv.length + 2)[0];
5+
const scriptDir = __dirname;
6+
const distDir = `${scriptDir}/../../dist`;
7+
8+
run();
9+
10+
function run() {
11+
const url = exec.execSyncRead(`npm view jsc-android@${version} dist.tarball`);
12+
exec.execSync(`curl ${url} | tar -xf -`);
13+
exec.execSync(`rm -rf ${distDir}`);
14+
exec.execSync(`cd package && mv $(find . -type d -maxdepth 1 -mindepth 1) ${distDir}`);
15+
exec.execSync(`rm -rf ./package`);
16+
}

0 commit comments

Comments
 (0)