-
Notifications
You must be signed in to change notification settings - Fork 4
[WIP] Update the commonly used functions to use Fabric instead of Fabric3 #79
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
base: develop
Are you sure you want to change the base?
Conversation
| def prompt(text, default=None, validate=None): | ||
| if default: | ||
| text = text.strip() | ||
| if text[-1] == ':' and len(text) > 1: |
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.
As this function is only used internally, I'm not sure why you would strip a colon from the end if it is present - just don't use the function that way.
| def title_print(title, state=''): | ||
| def prompt(text, default=None, validate=None): | ||
| if default: | ||
| text = text.strip() |
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.
Similar to my below comment - as it's used internally only, just don't call it with whitespace on the end..
Also remove bitbucket support to simplify branches significantly
| with virtualenv(new_venv), shell_env(DJANGO_SETTINGS_MODULE=settings_module): | ||
| sudo('[[ -e requirements.txt ]] && pip install -r requirements.txt') | ||
| sudo('pip install gunicorn') | ||
| with connection.prefix(f'workon {new_venv}'): |
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.
Don't assume virtualenvwrapper is installed, which provides workon.
fabric3 is dead since as of version 2, fabric supports python 3. fabric3 uses pycrypto which is itself an old a dead package. I'd rather not use an out of date cryptography package if we can avoid it.
This does mean we have to change how all the commands work however as the syntax for fabric 2.0 is wildly different to fabric 1.0 which is what the syntax for fabric3 was based on.
All commands updated, commands tested: