-
Notifications
You must be signed in to change notification settings - Fork 47k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ghstack-poisoned]
- Loading branch information
Showing
26 changed files
with
1,200 additions
and
192 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
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
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
|
||
const {join, relative} = require('path'); | ||
const {handleError} = require('./utils'); | ||
const yargs = require('yargs'); | ||
const clear = require('clear'); | ||
const theme = require('./theme'); | ||
const { | ||
downloadBuildArtifacts, | ||
} = require('./shared-commands/download-build-artifacts-ghaction'); | ||
|
||
const argv = yargs.wrap(yargs.terminalWidth()).options({ | ||
releaseChannel: { | ||
alias: 'r', | ||
describe: 'Download the given release channel.', | ||
requiresArg: true, | ||
type: 'string', | ||
choices: ['experimental', 'stable'], | ||
default: 'experimental', | ||
}, | ||
commit: { | ||
alias: 'c', | ||
describe: 'Commit hash to download.', | ||
requiresArg: true, | ||
demandOption: true, | ||
type: 'string', | ||
}, | ||
}).argv; | ||
|
||
function printSummary(commit) { | ||
const commandPath = relative( | ||
process.env.PWD, | ||
join(__dirname, '../download-experimental-build-ghaction.js') | ||
); | ||
|
||
clear(); | ||
|
||
const message = theme` | ||
{caution An experimental build has been downloaded!} | ||
You can download this build again by running: | ||
{path ${commandPath}} --commit={commit ${commit}} | ||
`; | ||
|
||
console.log(message.replace(/\n +/g, '\n').trim()); | ||
} | ||
|
||
const main = async () => { | ||
try { | ||
await downloadBuildArtifacts(argv.commit, argv.releaseChannel); | ||
printSummary(argv.commit); | ||
} catch (error) { | ||
handleError(error); | ||
} | ||
}; | ||
|
||
main(); |
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
Oops, something went wrong.