-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Dokku client #894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dokku client #894
Conversation
|
:| |
82128ab to
e35493e
Compare
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.
Having to echo app_name | dokku apps:destroy app_name was annoying. This allows dokku apps:destroy app_name force
|
Fancy. |
|
I just realized this breaks the auto adding of the remote. I feex. |
contrib/dokku_client.sh
Outdated
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 errors:
dokku_client.sh: line 34: lua: command not found
|
Nevermind that's a lie. If you set DOKKU_HOST variable it will attempt to If we are to auto add a git remote we'll need a way to generate an app name.... |
|
We do not want to do that if we don't have a remote. I mentioned in irc, but here are a few ways we can look at it:
Implement a solution in pure bash. OS X has Bash 3, so we might need to shell out to a temp file or something since you get arrays only in Bash 4 (or do something clever with sed/cut/counting spaces in a long string and getting the nth space and then the word before that...). You'll probably also want to check that an app of that name doesn't collide with an existing app, but we can actually do that in a later PR, given that this is in contrib. Either way 👍 thanks for the extra work :) |
aab1936 to
863790f
Compare
|
Includes dup app check and random app generator all in bash (works in bash 3 and 4)! |
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.
Because why tr if we don't have to 😉
…. tested on bash 4.3.18 and 3.2.53
863790f to
666f2d7
Compare
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.
Do these lines work in bash3? I'll test in the morning, but OS X comes with Bash 3 and I'm like 90% sure arrays are Bash 4.
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.
Also trollerskares around the word-wrapping :P
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.
I tested this with
# /bin/bash --version
GNU bash, version 3.2.53(1)-release (x86_64-apple-darwin14)
Copyright (C) 2007 Free Software Foundation, Inc.
and
# /usr/local/bin/bash --version
GNU bash, version 4.3.18(1)-release (x86_64-apple-darwin13.3.0)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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.
Yeah I was going to put the arrays in another file and source them but then that seemed to break the single-file nature of the client anyway...So, here we are? Open to suggestions.
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.
Nah, its all good :)
|
Does "enforces usage of bash" mean the script must be called from a bash shell or that the script needs to use bash specific syntax? |
|
I believe @josegonzalez is referring the shebang at the top of the file that was not there before. Of course, this also would mean that the script needs to use bash compatible syntax. |
|
@josegonzalez dropped This allows someone to pass |
A slightly better local dokku client. Appears to work with multiple hosts, and can be set as an alias in your bashrc. Also enforces usage of bash.