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

Clean old build artifacts #49

Closed
thedodd opened this issue Sep 21, 2020 · 2 comments
Closed

Clean old build artifacts #49

thedodd opened this issue Sep 21, 2020 · 2 comments
Labels
assets Build pipelines for specific asset types cli Trunk CLI application enhancement New feature or request good first issue Good for newcomers ready Ready to be implemented
Milestone

Comments

@thedodd
Copy link
Member

thedodd commented Sep 21, 2020

Currently, Trunk will continue to accumulate artifacts in the dist dir as changes continue to take place. This can be a bit overwhelming, and is something we should clean-up.

One approach may be to build a manifest of paths generated per build. At the very end of the build, we will go through the dist dir and remove anything which was not generated as part of the current build.

proposed design

  • introduce a new sub dir of dist, let's call it .current, which represents the artifacts being accumulated in the current build.
  • dist/.current will be deleted before any new build is started.
  • as the very final step of a successful build, we will delete the contents of the dist dir (except for the .current dir), and then immediately move all of the contents of dist/.current up into dist.

This will ensure that we do not continuously accumulate artifacts as builds take place, and will also ensure that artifacts are not prematurely deleted in case of application compilation errors on the user's behalf.

@thedodd thedodd added enhancement New feature or request good first issue Good for newcomers cli Trunk CLI application assets Build pipelines for specific asset types labels Sep 21, 2020
@thedodd thedodd added this to the 0.5.0 | TBD milestone Sep 21, 2020
@ranile
Copy link
Contributor

ranile commented Sep 21, 2020

For some context on where it can lead to:
image

That ended up happening in a short amount of time

@thedodd
Copy link
Member Author

thedodd commented Feb 1, 2021

Closed by #108

@thedodd thedodd closed this as completed Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assets Build pipelines for specific asset types cli Trunk CLI application enhancement New feature or request good first issue Good for newcomers ready Ready to be implemented
Projects
None yet
2 participants