Skip to content
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

When using `deploy -d` option, do not warn when pushing to development #372

Open
wants to merge 3 commits into
base: master
from

Conversation

@westonganger
Copy link
Contributor

commented May 29, 2019

Turns out the yes/no question for deploy -d option is a little bit monotonous in development environment. Lets skip if for development env.

@@ -40,7 +40,7 @@ def push

# Ask for a confirmation (Warning) if we deploy with the -d option
# since it alters content on the remote engine
if options[:data]
if options[:data] && self.env != 'development'

This comment has been minimized.

Copy link
@did

did May 29, 2019

Member

I've not thought about that. In that case, I think we should a ruby constant like DEVELOPMENT_ENV_NAMES or DEVELOPMENT_ENVS or perhaps a method named is_development_env? which lists all the possible names used for a non prod env (development, dev, test, staging, ...etc).

This comment has been minimized.

Copy link
@westonganger

westonganger May 29, 2019

Author Contributor

I was thinking about this already. I think self.env== 'production' would be better here

This comment has been minimized.

Copy link
@did

did May 29, 2019

Member

same problem here. I use production most of the time but sometimes I also use hosting.

This comment has been minimized.

Copy link
@westonganger

westonganger May 29, 2019

Author Contributor

Hmm rather than an environment variable, I propose another key added to the config/deploy.yml like do_not_ask or is_development_env

This comment has been minimized.

Copy link
@westonganger

westonganger May 30, 2019

Author Contributor

Can we merge the current self.env== 'production' in the meantime until a better solution is commited?

westonganger added some commits May 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.