-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
enhancement / address build command papercuts #153
Open
gwleuverink
wants to merge
19
commits into
NativePHP:main
Choose a base branch
from
gwleuverink:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Simon Hamp <[email protected]>
Co-authored-by: Simon Hamp <[email protected]>
Co-authored-by: Simon Hamp <[email protected]>
… symlinked composer deps)
I'm sure this needs more polish, but I'd appreciate a review since I'm changing around quite a bit of stuff @simonhamp Don't want to make a wrong turn & have to backtrack. Appreciate it! 🙏🏻 |
Tests didn't pass for php 8.1 because I used some some incompatible syntax |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adresses a couple of papercuts I've found in the build/publish commands.
Fixed
I've addressed this by porting the app copy logic to a php trait. This way the app is copied over before the electron-builder is executed. The copy step inside the electron-builder has been removed in favor for this approach. This way we don't have to modify any userland code.
During the copy step I account for files and directories that should be skipped. I've used an internal list here, which merges with the list of globs in the nativephp config file.
mac-latest.yaml
was overwritten by the last commandI've tried fixing that before in PR #145. Sadly this caused the last architecture not to compile with the correct php version
I've addressed this by removing the php building step as from the package.json scripts, and rather embed them in the build process by using a beforePack hook.
Other points for your consideration
GITHUB_REPO
,GITHUB_OWNER
,GITHUB_PRIVATE
are cleaned up, the publish command cannot upload to github.They are all caught by the
GITHUB_*
wildcard. I assume this assume is true for the other update providers too. Maybe the default list of env keys to be cleaned should be more specific, like:GITHUB_TOKEN
? (that's the only important one that needs to be cleared anyway)I'm not sure if this still is an issue after these changes. Since we're not directly updating the projects' main env file anymore.
Should we default to
LOG_STACK=daily
when building the app?node_modules
directory when building?This can become unwieldy quick! A fresh Laravel install already comes with a 30mb
node_modules
directory.Not sure if we want to keep
node_modules/.bin
in this case.. An argument could be made to keep that around.Not sure if this is by design.
php.js
was invoked with the--x86
flag, while electron builder was invoked with--mac --x64
in thebuild:mac-x86
script.I kept this behaviour in, but not sure why it is like this