saltstack-formulas / apache-formula

Set up and configure the Apache HTTP server
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
50 stars 285 forks source link

refactor(vhosts): reduce empty lines in standard.tmpl and proxy.tmpl #293

Closed SuperTux88 closed 3 years ago

SuperTux88 commented 3 years ago

PR progress checklist (to be filled in by reviewers)


What type of PR is this?

Primary type

Secondary type

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

Describe the changes you're proposing

Reducing empty lines in vhost templates

Pillar / config required to test the proposed changes

Debug log showing how the proposed changes work

Documentation checklist

Testing checklist

Additional context

noelmcloughlin commented 3 years ago

@SuperTux88 Could you confirm the generated files looked okay afterwards? Somethings adding jinja2 - works fine and sometimes it silently corrupts the generated file.. otherwise LGTM

SuperTux88 commented 3 years ago

Yes, generated files look OK, I tried a lot of different combinations of configs and it all generated as expected.

As long as you add the - only on lines where nothing else is added, it should be fine. For example, this is fine: {%- if map.version == '2.4' %} (because it just removes the empty line this line would insert otherwise), but a - would break on this line: {% if lvals.get('Require') != False %}Require {{ lvals.Require }}{% endif %} because it would wrap the complete line together with the line above (which would corrupt if the line above already contains something).

(also, I have no idea why GitHub added the same CI job twice but only marked on as green ... both link to the same job which is green)

noelmcloughlin commented 3 years ago

LGTM and sounds good too ;-)

saltstack-formulas-travis commented 3 years ago

:tada: This PR is included in version 1.1.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: