-
Notifications
You must be signed in to change notification settings - Fork 13
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
Added bsf clean Command to Remove Autogenerated Files #121
base: main
Are you sure you want to change the base?
Conversation
cmd/clean/clean.go
Outdated
) | ||
|
||
func init() { | ||
rootCmd.AddCommand(cleanCmd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic should go over here:
Line 70 in a2c73d1
if os.Getenv("BSF_DEBUG_MODE") == "true" { |
cmd/clean/clean.go
Outdated
|
||
// cleanUp deletes the autogenerated BSF files and directories. | ||
func cleanUp() error { | ||
configs := []string{"bsf", "bsf-result", "bsf.hcl", "bsf.lock"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this give an error if bsf-result
is not already present? Please check once
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you check this? Was it giving an error?
cmd/clean/clean.go
Outdated
} | ||
|
||
// cleanUp deletes the autogenerated BSF files and directories. | ||
func cleanUp() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reuse the logic which is already present under cmd/init
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Can you please sign your commits?
Done , pls check it and anything to add let me know |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done , pls check it and anything to add let me know
Thanks for making the changes @RohanMishra315. The commits are still not signed and some of the comments are still unaddressed, please fix those as well. Additionally, can you add yourself in the ./CONTRIBUTORS.md
file as well?
Hi @RohanMishra315, let me know if you need any help |
Hi @RohanMishra315, checking up on this again |
#120
Description:
This PR introduces a new bsf clean command that simplifies the cleanup of autogenerated files and directories during development. This feature is especially useful when testing new features or iterating locally, where manual deletion of these files is often needed.
Key Features:
The bsf clean command deletes the following autogenerated files and directories:
bsf/
bsf-result/
bsf.hcl
bsf.lock
Reuses the cleanup logic from cmd/init, ensuring consistency and reducing code duplication.