Closed pgfeller closed 4 months ago
Patrik, is there a way I can test it? It least the preview tells us that it least did not break anything on our platform ;-) I would just dare to merge it, WDYT?
I would just dare to merge it, WDYT?
@stefan-hoehn:
Well - the change in package.json
that controls build should not be affect productive mode (dev/local only). The other thing that changed is .gitignore
- but here as well I do not expect a problem ➡️ in my opinion we should try the merge - but be prepared for an immediate rollback in case of a problem. I expect that a failed build would persist the build logs - so that I/we could analyze what caused the issue & how we can prevent that problem in the future.
Ok, then I will merge. Please @pgfeller have a look at it as well if it went well.
Patrik, is there a way I can test it?
@stefan-hoehn
I do not know how close the apple os is to linux - maybe you can test the local dev build on your machine. But I'm not sure that the productive build will use the exact same mechanism (actually I'm sure it does not - but probably the PR check does). So I recommendation remains the same - we should give it a try. But it would also be interesting if the modified dev build scripts make the life easier on the mac platform.
FYI I edited and added a few things. You may want to review this.
I tried running it (in the root folder of the project) but it fails pretty fast:
openhab-website % npm run build-local-latest -y
> openhab-website@3.0.0 build-local-latest
> OH_DOCS_VERSION=final npm run build-local
> openhab-website@3.0.0 build-local
> rm javadoc-*.tgz* -f && npm run prepare-docs && npm run dev
rm: javadoc-*.tgz*: No such file or directory
rm: -f: No such file or directory
openhab-website@3.0.0 build-local rm javadoc-.tgz -f && npm run prepare-docs && npm run dev rm: javadoc-.tgz: No such file or directory rm: -f: No such file or directory
This should delete "old" download tar balls from previous build - but if there was no previous build and the temp files are not present rm
seems to fail. That can probably be solved with a parameter for the rm
command. Shall I have a look - or do you have time to try it locally and commit the change directly?
No, I don't have the time. I would appreciate if you had the chance to look into it 🙏🏻
Tested together with @pgfeller and looks awesome.
Very nice contribution, <3 !
Fixes #452
This fix allows to build the website completely locally and makes the process much easier for contributors to verify their changes locally.
javadoc-*
anddocs
folder to.gitignore
CONTRIBUTING.md
how to install the requiredRuby
version on recent ubuntu based linux distributions📦 package.json
added engines constraint for
node
remove existing downloaded documentation archives prior to build
added convenience scripts to create local builds:
npm run build-local-latest
npm run build-local-stable