feat(build): Enable local dev build#705
Merged
crocodilestick merged 2 commits intocrocodilestick:mainfrom Oct 27, 2025
Merged
Conversation
Updates the build script to add CLI flags for a local build. This will use the existing checked-out repo instead of cloning the repo fresh, for building images for development and testing before code is ready to push up. Also adds CLI flags for the different things the script asks for, mostly as a convenience for people like me who might just re-run the build with some things always the same. I added flags for all of them, just seemed silly to only cover some of them, and the default behavior is the same as it is today. Having flags for values let me shuffle some code around to better reflect what's happening. If a user is provided, for example, there's no point asking for it again or getting the default user. And I added a .editorconfig file, to avoid whitespace-only changes. I took a guess at line width values.
dc36f35 to
9364773
Compare
Fixed a couple issues with the local build mode: - dirname was returning relative paths which broke when running the script from different locations. Now properly resolves to absolute path - Added error handling for the cd command so it doesn't silently fail if something goes wrong Also bumped Python line length in editorconfig from 88 to 120 since the existing codebase already has tons of lines over 88 chars anyway. Should cut down on unnecessary warnings.
Owner
|
Thank you so much for this! Great work! I've also added a page to the CWA Wiki explaining the script and how to use it, please give it a quick look over if you get the chance :) https://github.com/crocodilestick/Calibre-Web-Automated/wiki/Building-Custom-Docker-Images |
Contributor
Author
|
Looks good, thanks! |
This file contains hidden or 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
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.
Updates the build script to add CLI flags for a local build. This will use the existing checked-out repo instead of cloning the repo fresh, for building images for development and testing before code is ready to push up.
Also adds CLI flags for the different things the script asks for, mostly as a convenience for people like me who might just re-run the build with some things always the same. I added flags for all of them, just seemed silly to only cover some of them, and the default behavior is the same as it is today.
Having flags for values let me shuffle some code around to better reflect what's happening. If a user is provided, for example, there's no point asking for it again or getting the default user.
And I added a .editorconfig file, to avoid whitespace-only changes. I took a guess at line width values.