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

Reduce commands of makefile #3040

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Saphyel
Copy link

@Saphyel Saphyel commented Sep 12, 2022

The makefile has some duplicate commands that could be removed if we use some defaults, moving towards a conf first approach and using optional arguments we could reduce the list of commands making the final user memorize less commands.

The benefit of this is less commands to remember, less errors because we use the same commands and make it more easy to add more external front-ends for the commands (officially supported or not)

I'm using PDM and I only really need this commands in the pyproject.toml:

[tool.pdm.scripts]
build = "pelican -s pelicanconf.py"
server = "pelican -lr -s pelicanconf.py"
publish = "pelican -s publishconf.py"

So I don't really see the use case for other options (excluding the deployment options).

Just to clarify I'm not requesting to support other tools but to make the makefile rely more in the conf file and less on hard coded values so even the "invoke" tasks would benefit from this.

@justinmayer
Copy link
Member

Hi Carlos. I get the impression that this isn't exactly a neutral change. One set of commands uses localhost by default, while the "global" variants use 0.0.0.0, which can be accessible outside one's local workstation and which is either a benefit or a hazard, depending on one's perspective. Or I'm just tired and perhaps missing something obvious.

Put another way, if these changes were merged, how would someone who prefers to serve on localhost use the Make automation to do so?

@Saphyel
Copy link
Author

Saphyel commented Sep 13, 2022

One option would be using the env var SERVER on the makefile

Or use the conf option "BIND" so in this way you can rerun the same command many times and if you want to change the conf file or edit that file (similar concept as using the .env file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants