Skip to content

Commit 6037968

Browse files
committed
Set server URL
1 parent 61a9c33 commit 6037968

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

bin/dropstack-deploy

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ program
1818
.arguments('[folder]')
1919
.option('-t, --token [token]', 'Use JSON Web Token credentials')
2020
.option('-a, --alias [name]', 'Set alias of deployment', '')
21+
.option('-u, --url [url]', 'Set server URL of deployment', '')
2122
.option('-y, --type [name]', 'Set type of deployment manually')
2223
.option('-s, --https', 'Enable HTTPS/HTTP2/SPDY of deployment')
2324
.option('-v, --variables [items]', 'Key=Value variables', (item, list) => { list.push(item); return list; }, [])
@@ -26,7 +27,7 @@ program
2627

2728
deploy(Object.assign(program.opts(), {folder: program.args.length === 0 ? process.cwd() : program.args[0] }));
2829

29-
function deploy({folder, token, variables, instances, alias, https, type}){
30+
function deploy({folder, token, variables, instances, alias, https, type, url}){
3031
const args = path.resolve(folder);
3132
const pathObj = path.parse(args);
3233
const tarPath = path.join(os.tmpdir(), `${pathObj.name}.tar`);
@@ -42,6 +43,7 @@ function deploy({folder, token, variables, instances, alias, https, type}){
4243
alias,
4344
type,
4445
https,
46+
url,
4547
}));
4648

4749
configuration
@@ -54,9 +56,9 @@ function deploy({folder, token, variables, instances, alias, https, type}){
5456
});
5557
}
5658

57-
function sync({tarPath, token, variables, instances, alias, type, https}){
59+
function sync({tarPath, token, variables, instances, alias, type, https, url}){
5860
configuration
59-
.load({variables, tarPath, instances, token, alias, type, https})
61+
.load({variables, tarPath, instances, token, alias, type, https, url})
6062
.then(settings => { console.log(`Deploying ${chalk.green.underline(settings.alias || settings.name || '-')} for ${chalk.green.underline(settings.username || '-')} on ${chalk.green.underline(settings.url || '-')}`); return settings;})
6163
.then(settings => {
6264
if(settings.message) return Promise.reject(new Error(settings.message));

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dropstack-cli",
3-
"version": "1.5.1",
3+
"version": "1.5.2",
44
"description": "A CLI to simplify continuous deployments via Web-Service API and Docker Swarm with integrated SSL, DNS-Server and JWT authentification.",
55
"bin": {
66
"dropstack": "./bin/dropstack"

0 commit comments

Comments
 (0)