This repository was archived by the owner on May 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 79
aragon-run: Add option for --client-repo #781
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ const TaskList = require('listr') | |
| const pkg = require('../../package.json') | ||
| const { installDeps } = require('../util') | ||
|
|
||
| const DEFAULT_CLIENT_REPO = pkg.aragon.clientRepo | ||
| const DEFAULT_CLIENT_VERSION = pkg.aragon.clientVersion | ||
| const DEFAULT_CLIENT_PORT = pkg.aragon.clientPort | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a small fix on line 17: |
||
|
|
@@ -19,6 +20,11 @@ exports.describe = 'Start the Aragon GUI (graphical user interface)' | |
|
|
||
| exports.builder = yargs => { | ||
| return yargs | ||
| .positional('client-repo', { | ||
| description: | ||
| 'Repo of Aragon client used to run your sandboxed app (valid git repository using https or ssh protocol)', | ||
| default: DEFAULT_CLIENT_REPO, | ||
| }) | ||
| .positional('client-version', { | ||
| description: | ||
| 'Version of Aragon client used to run your sandboxed app (commit hash, branch name or tag name)', | ||
|
|
@@ -34,7 +40,12 @@ exports.builder = yargs => { | |
| }) | ||
| } | ||
|
|
||
| exports.task = async function({ clientVersion, clientPort, clientPath }) { | ||
| exports.task = async function({ | ||
| clientRepo, | ||
| clientVersion, | ||
| clientPort, | ||
| clientPath, | ||
| }) { | ||
| const tasks = new TaskList([ | ||
| { | ||
| title: 'Fetching client from aragen', | ||
|
|
@@ -50,7 +61,7 @@ exports.task = async function({ clientVersion, clientPort, clientPath }) { | |
| skip: ctx => !!clientPath, | ||
| task: async (ctx, task) => { | ||
| task.output = 'Downloading client...' | ||
| await downloadClient(ctx, task, clientVersion) | ||
| await downloadClient({ ctx, task, clientRepo, clientVersion }) | ||
| }, | ||
| enabled: ctx => !ctx.clientFetch, | ||
| }, | ||
|
|
@@ -87,18 +98,24 @@ exports.task = async function({ clientVersion, clientPort, clientPath }) { | |
|
|
||
| exports.handler = async ({ | ||
| reporter, | ||
| clientRepo, | ||
| clientVersion, | ||
| clientPort, | ||
| clientPath, | ||
| }) => { | ||
| const task = await exports.task({ clientVersion, clientPort, clientPath }) | ||
| const task = await exports.task({ | ||
| clientRepo, | ||
| clientVersion, | ||
| clientPort, | ||
| clientPath, | ||
| }) | ||
| return task | ||
| .run() | ||
| .then(() => | ||
| reporter.info( | ||
| `Aragon client version ${chalk.blue( | ||
| `Aragon client from ${chalk.blue(clientRepo)} version ${chalk.blue( | ||
| clientVersion | ||
| )}, started on port ${chalk.blue(clientPort)}` | ||
| )} started on port ${chalk.blue(clientPort)}` | ||
| ) | ||
| ) | ||
| } | ||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This blurb is a placeholder. We need to fill in the correct date & release version before merging.