A perhaps too-baroque way to clean files but also keep some.
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -3,9 +3,13 @@
|
||||
|
||||
### Files private to developers
|
||||
|
||||
# Files that should be git-ignored, but are hand-edited or otherwise valued,
|
||||
# and so should not be destroyed by "make clean".
|
||||
# start-noclean
|
||||
requirements/private.txt
|
||||
lms/envs/private.py
|
||||
cms/envs/private.py
|
||||
# end-noclean
|
||||
|
||||
### Python artifacts
|
||||
*.pyc
|
||||
|
||||
9
Makefile
Normal file
9
Makefile
Normal file
@@ -0,0 +1,9 @@
|
||||
# Do things in edx-platform
|
||||
|
||||
clean:
|
||||
# Remove all the git-ignored stuff, but save and restore things marked
|
||||
# by start-noclean/end-noclean.
|
||||
sed -n -e '/start-noclean/,/end-noclean/p' < .gitignore > /tmp/private-files
|
||||
tar cf /tmp/private.tar `git ls-files --exclude-from=/tmp/private-files --ignored --others`
|
||||
git clean -fdX
|
||||
tar xf /tmp/private.tar
|
||||
Reference in New Issue
Block a user