Skip to content

Conversation

@acsr
Copy link
Contributor

@acsr acsr commented Nov 12, 2025

see Ticket #305

  • I signed and returned the Plone Contributor Agreement, and received and accepted an invitation to join a team in the Plone GitHub organization.
  • I verified there aren't any other open pull requests for the same change.
  • I followed the guidelines in Contributing to Plone.
  • I successfully ran code quality checks on my changes locally.
  • I successfully ran tests on my changes locally.
  • If needed, I added new tests for my changes.
  • If needed, I added documentation for my changes.
  • I included a change log entry in my commits.

Closes #305

@acsr
Copy link
Contributor Author

acsr commented Nov 20, 2025

I have overseen a flaw that the new expression does not include the resolution of the variable $(STACK_NAME) in the output:

make help

# partial output:
...
stack-deploy       Deploy stacks: $(STACK_NAME)
stack-create-site      Create a new site stacks: $(STACK_NAME)
...

I see that the flaw was present already before my suggested change.

I need to figure out how to make them work. Especially when the devops stuff is not fully generated from the .env file.

My opinion: Leaving in this new state is better than nothing and then make a next iteration.

@acsr
Copy link
Contributor Author

acsr commented Nov 20, 2025

I need to figure out how to make them work. Especially when the devops stuff is not fully generated from the .env file.

The issue comes up because the expression filters the Makefile for the text behind double ## to catch the text for the output.

  • The variable $(STACK_NAME) is not expanded in that context and just taken literal for the output.
  • The help text plural "stacks" suggests this command deals with multiple different stacks. Not sure if this is true.[*]
  • This can be replaced in the output with a more generic text like:
...
stack-deploy       Deploy stack: uses $(STACK_NAME) currently defined in your .env
stack-create-site      Create a new site stack: uses $(STACK_NAME) currently defined in your .env
...

It seems I cannot do that much more without diving too deep into Makefiles (for my scope).

[*] I personally use multiple stacks (two: one for the production server, one for a full featured staging server)

@davisagli
Copy link
Member

The reason the existing command doesn't work is because MAKEFILE_LIST is equal to Makefile .env rather than just Makefile. grep is searching multiple files so it prepends the filename to the output.

I suggest a simpler fix (so it's more consistent with the other Makefile help commands): let's change the command to explicitly refer to Makefile instead of $(MAKEFILE_LIST)

@davisagli
Copy link
Member

@acsr I did it my way in #317. Thanks for pointing out the problem and proposing a fix.

@davisagli davisagli closed this Nov 29, 2025
@acsr
Copy link
Contributor Author

acsr commented Dec 1, 2025

@acsr I did it my way in #317. Thanks for pointing out the problem and proposing a fix.

@davisagli Now it is all green ;-)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix broken devops Makefile help generation expression

3 participants