-
Notifications
You must be signed in to change notification settings - Fork 0
Makefile .env copy confirmation implemented #4
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: master
Are you sure you want to change the base?
Conversation
|
@vehsamrak thank you for suggestion. I think, it's over much (code and logic) for this case. I saw (and known) some user stories around this functionality:
For 1 US, run without prompts and supported options is better as more simple and fast. I want keep it simple. For 2 US, I have more than 12 projects with very similar Makefiles, and suggested difference not give benefits for long term support it's all, or I need spend many time for reuse this feature, or copy-paste to other projects. For 3 US, you can append to .env file what you need after install and before run. Or replace it as you want. |
|
I think copying files on behalf of user and without user notice is bad practice, and could be considered as disrespect. The argument for projects with very similar Makefiles is the separated function (like in gist above). |
|
I stripped colors and result messages from confirmation logic to become as simple as possible |
|
I think, the simplest and user friendly way is move cp call to install section, when it is needed. So, we have 2 cases:
PS: on |
|
Sounds decent. Main problem with this approach is that Take a look please |
| cp -i dist.env .env | ||
| docker compose pull | ||
| docker network create $(DEV_ROUTER_NETWORK) | ||
| . ./.env && docker network create $$DEV_ROUTER_NETWORK |
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.
$$VAR from shell, instead of $(VAR) from make
|
|
||
| .PHONY: install | ||
| install: | ||
| cp -i dist.env .env |
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 am get feedback, from mac user: -i with n return non zero and abort execution :(
Unfortunately, And same expected functionality, behavior and code in different projects is prior. |
Command
cpis mutable, so it would be better to confirm execution to leave control to the user.