Merge pull request #2 from electron/urls

add a flag for displaying asset URLs
This commit is contained in:
Zeke Sikelianos 2017-08-04 10:23:12 -07:00 коммит произвёл GitHub
Родитель e2abe26b98 b6505e13e0
Коммит dbee7cfc28
3 изменённых файлов: 24 добавлений и 4 удалений

Просмотреть файл

@ -4,7 +4,8 @@ const got = require('got')
const assert = require('assert')
const ghauth = require('ghauth')
const GitHub = require('github')
const query = process.argv.slice(2)[0]
const args = require('minimist')(process.argv.slice(2))
const query = args._[0]
require('colors')
const authOptions = {configName: 'libcc-check', note: 'electron/libcc-check'}
@ -53,8 +54,13 @@ ghauth(authOptions, function (err, authData) {
// add space between branches
if (!query && i > 0 && asset.branch != assets[i-1].branch) console.log('')
console.log(`${status} ${asset.branch} - ${asset.commit} - ${asset.platform}`)
if (args.urls) {
console.log(`${status} ${asset.branch} - ${asset.url}`)
} else {
console.log(`${status} ${asset.branch} - ${asset.commit} - ${asset.platform}`)
}
})
})
.catch(err => {

Просмотреть файл

@ -11,6 +11,7 @@
"colors": "^1.1.2",
"ghauth": "^3.2.1",
"github": "^9.2.0",
"got": "^7.1.0"
"got": "^7.1.0",
"minimist": "^1.2.0"
}
}

Просмотреть файл

@ -51,6 +51,19 @@ libcc-check upgrade-to-chromium-59
You could also just `libcc-check | grep foo`, but then you'd lose the colored
output.
If you want to see the actual file URLs, use the `--urls` flag:
```
libcc-check 1-6-x --urls
✓ electron-1-6-x - https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent/osx/x64/f3e99add3753f82f9ce02788144b9ea9cd6367d8/libchromiumcontent.zip
✓ electron-1-6-x - https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent/mas/x64/f3e99add3753f82f9ce02788144b9ea9cd6367d8/libchromiumcontent.zip
✓ electron-1-6-x - https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent/win/ia32/f3e99add3753f82f9ce02788144b9ea9cd6367d8/libchromiumcontent.zip
✓ electron-1-6-x - https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent/win/x64/f3e99add3753f82f9ce02788144b9ea9cd6367d8/libchromiumcontent.zip
✓ electron-1-6-x - https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent/linux/ia32/f3e99add3753f82f9ce02788144b9ea9cd6367d8/libchromiumcontent.zip
✓ electron-1-6-x - https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent/linux/x64/f3e99add3753f82f9ce02788144b9ea9cd6367d8/libchromiumcontent.zip
✓ electron-1-6-x - https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent/linux/arm/f3e99add3753f82f9ce02788144b9ea9cd6367d8/libchromiumcontent.zip
```
## License
MIT