Skip to content
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

Cleanup Build Scripts #1174

Open
pano9000 opened this issue Feb 12, 2025 · 0 comments
Open

Cleanup Build Scripts #1174

pano9000 opened this issue Feb 12, 2025 · 0 comments

Comments

@pano9000
Copy link
Contributor

pano9000 commented Feb 12, 2025

Describe Task

We currently have a weird and confusing mixture of ways of how to build our packages.

I can identify

  • Desktop Version

    • we have an npm script for building locally, but it also is called in our Github CI actions
    • this build with node v20 as base (if I am not fully mistaken)
  • Server Version

    • we don't seem to have an npm script for this but the Github CI Action is running ./bin/build-server.sh, which is running
      • ./bin/copy-trilium.sh which is doing similar things like copy-dist.ts above, but some additional cleaning
      • ./bin/build-server.sh then does also some clean up like of unneeded files for the Server version
    • we have a Dockerfile
      • has its own build instructions directly in the Dockerfile,
      • which are doing similar things like copy-dist.ts and ./bin/build-server.sh
    • this builds with node v22 as base
    • we have a ./bin/build-docker.sh script that builds above Dockerfile, but first needs to transpile the code locally via tsc???
    • we have a main-docker.yml workflow, which seems to be doing what ./bin/build-docker.sh is doing, but it runs the commands explicitly (i.e. not the script itself -> in other words: we have code duplication)

copy-dists.ts seems to be less "advanced" than copy-trilium.sh in regards to "cleanup", i.e. copy-trilium.sh tries to delete unnecessary test files from npm modules as well.

In ./bin we also have a build.sh script, that references some other build-scripts that are not existing anymore (because they were replaced by using electron-forge), which also calls copy-trilium.sh

We should take a look at all of these and try to clean them up and make them a bit less confusing and duplicated :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant