Skip to content

Commit

Permalink
feat: allow deploy scripts to see the deployment host and port
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Sep 29, 2020
1 parent 9f37aa8 commit 7ab7108
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/agoric-cli/lib/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ export default async function deployMain(progname, rawArgs, powers, opts) {
ws.send(body);
};

const match = opts.hostport.match(/^(.*):(\d+)$/);
const host = match ? match[1] : 'localhost';
const port = match ? match[2] : '8000';

const wsurl = `ws://${opts.hostport}/private/captp`;
const exit = makePromiseKit();
let connected = false;
Expand Down Expand Up @@ -225,6 +229,8 @@ export { bootPlugin } from ${JSON.stringify(absPath)};
bundleSource: file => bundleSource(pathResolve(file)),
pathResolve,
installUnsafePlugin,
host,
port,
});
}
}
Expand Down

0 comments on commit 7ab7108

Please sign in to comment.