Repository navigation
fix dotnet build cleanup - #1678
Merged
Merged
Conversation
rkm
force-pushed
the
dotnet-fix-cleanup
branch
3 times, most recently
from
November 2, 2020 17:35
8e9ae98 to
8bfa650
Compare
asottile
reviewed
Nov 2, 2020
| if os.path.isfile(path): | ||
| os.remove(path) | ||
| elif f not in to_keep: | ||
| rmtree(path) |
Member
There was a problem hiding this comment.
the problem with this is it will break when introducing language_version for dotnet as that allows multiple builds in a single clone
is there a way we can leverage git clean to do this for us?
Contributor
Author
There was a problem hiding this comment.
Ah, good point -- I had hoped we could blitz the entire git directory after the tool install.
I'll look for a git cleaner solution
Member
There was a problem hiding this comment.
there's also the potential that a script hook is defined in the same repo as well
rkm
force-pushed
the
dotnet-fix-cleanup
branch
from
November 2, 2020 18:06
8bfa650 to
76c5950
Compare
asottile
reviewed
Nov 2, 2020
| prefix, | ||
| ( | ||
| 'git', 'clean', '-fxd', | ||
| '-e', helpers.environment_dir(ENVIRONMENT_DIR, version), |
Member
There was a problem hiding this comment.
this should probably be f'{ENVIRONMENT_DIR}-*'
| helpers.run_setup_cmd( | ||
| prefix, | ||
| ( | ||
| 'git', 'clean', '-fxd', |
Member
There was a problem hiding this comment.
I've actually got a video coming up soon that indicates this should be -ffxd :)
rkm
force-pushed
the
dotnet-fix-cleanup
branch
from
November 2, 2020 18:36
76c5950 to
2b12203
Compare
asottile
force-pushed
the
dotnet-fix-cleanup
branch
from
November 3, 2020 16:53
2b12203 to
aa80234
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

From testing, I found that the
binandobjdirectories may be elsewhere depending on the particular hook project layout. I'd also like to cleanup the build directory properly, since we only need thedotnetenv-defaultdir after we install the tool.This patch should solve both cases.