Skip to content

[scripts] Remove build directory before building Kresus for release.

Antoine requested to merge ZeHiro/kresus:cleant-build-release into master

Withe renamings of files, deletion of certain client bundle for example, some old files tend to remain in the 'build' directory. Below, an example of before deleting the repo and after build:prod on master (this is the output of du -H ./build/client/*.js:

2,9M	./build/client/0.js
156K	./build/client/1.js
40K	./build/client/2.js
448K	./build/client/3.js
32K	./build/client/4.js
8,0K	./build/client/5.js
1,2M	./build/client/main.js
4,0K	./build/client/themes-dark-bundle.js
8,0K	./build/client/themes-default-bundle.js
4,0K	./build/client/themes-light-bundle.js

After removing the build directory and running build:prod on master (no change in the code):

448K	./build/client/3.js
36K	./build/client/4.js
8,0K	./build/client/5.js
1,2M	./build/client/main.js
4,0K	./build/client/themes-dark-bundle.js
4,0K	./build/client/themes-light-bundle.js

Ans as we add the full build directory when bulding the npm module (https://framagit.org/kresusapp/kresus/-/blob/master/scripts/release.sh#L24), the leftover files are also included.

Edited by Antoine

Merge request reports