Improve Makefile compatibility with macOS. - #467
Conversation
|
@thet thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment: To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
The previous Makefile used `.ONESHELL` and `.SHELLFLAGS`, features of GNU make 3.82. macOS ships with GNU make 3.81 and those features are not available. For better compatibility (and maybe even maintainability), move the shell commands into their own shell scripts. Co-authored-by: Codex <noreply@openai.com>
This removes the need to have towncrier installed globally. Co-authored-by: Codex <noreply@openai.com>
d840693 to
ac6ac7a
Compare
petschki
left a comment
There was a problem hiding this comment.
Makefile works perfect here on my Mac. Two questions:
- Bootstrap (S)CSS Fonts added. I always wanted that, but if we want to use that OOTB, we have to include the generated CSS file in the resources and add an upgrade step.
- countryflag icons adds unneeded
scripts/directory. Should we add that to the.gitignore?
|
Regarding Icon CSS: maybe this should go into the barceloneta theme package? |
ac6ac7a to
f783ff0
Compare
|
@petschki I have now excluded all unnecessary files - including the fonts and css files. Hope that's ok. We can add icon fonts if really needed, but basically using svgs is the recommended way. |
f783ff0 to
010f3bd
Compare
… and changelog entry. Co-authored-by: Codex <noreply@openai.com>
…ase. Co-authored-by: Codex <noreply@openai.com>
…ase among the first 100 GitHub releases. Co-authored-by: Codex <noreply@openai.com>
When updating icons with update-bootstrap-icons and update-country-flags some resources (.gitignore files, scripts, unused CSS and SCSS files, fonts) are installed, which we do not use nor want. These are git-ignored and not added to the repository.
010f3bd to
f479bef
Compare
|
I just tried this and it works like a charm. One thing though: I updated my branch and ran (before the |
- Add a `check-dependencies` target, which the update targets run first. It reports missing commands (curl, git, jq, tar, python3 with venv) with installation hints for macOS and Linux. - Only (re)create the virtual environment if it is missing or broken, instead of running `python3 -m venv` over an existing one on every call, which mixed Python versions. - Download Mockup and Bootstrap Icons from the npm registry. `update-mockup` uses the dist-tag `latest`, `update-mockup-prerelease` the dist-tag `alpha` (configurable via `MOCKUP_PRERELEASE_TAG`). Fail if the Mockup npm package contains no built bundle. Only copy the SVG icons of Bootstrap Icons. - Resolve the country flags revision via `git ls-remote` and download it as tarball. - Do not use the rate limited GitHub API, `wget` or `unzip` anymore. Downloads go to a temporary directory which is removed on exit. - Update the news files and remove co-author lines from them; co-author attributions belong in the commit messages only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4f9f2d8 to
f479bef
Compare
`make update-mockup-prerelease` now installs the highest version among the npm dist-tags `alpha`, `beta` and `rc`, which is higher than `latest`. Versions are compared by semver instead of publish date, as maintenance releases may be published after pre-releases of the next release line. Stale pre-release tags of older release lines are ignored. Remove `MOCKUP_PRERELEASE_TAG`; use `MOCKUP_VERSION` to select a specific version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Makefile: Download resources from npm and check dependencies.
The update scripts record the version and source of Mockup, Bootstrap Icons and country flags (including the exact revision, as the upstream version is rarely bumped) in resource-versions.json. The file is only updated when the resources change and is committed together with them. - Add `make versions` to show the recorded versions. - Include resource-versions.json in the sdist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
.ONESHELLand.SHELLFLAGS, features of GNU make 3.82. macOS ships with GNU make 3.81 and those features are not available. For better compatibility (and maybe even maintainability), move the shell commands into their own shell scripts.This removes the need to have towncrier installed globally.