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

Add repository reset tools for developers #279

Open
matthewfeickert opened this issue Feb 20, 2024 · 3 comments
Open

Add repository reset tools for developers #279

matthewfeickert opened this issue Feb 20, 2024 · 3 comments

Comments

@matthewfeickert
Copy link
Member

After a local build of the the package

python -m pip install --upgrade --verbose .

the repository is left in a dirty state with additional untracked files in both the repository and the Git submodules. It would be useful to add either a Makefile or a noxfile.py that impliments git clean commands to quickly reset the repository and submodules to a clean state with a single command.

@matthewfeickert
Copy link
Member Author

matthewfeickert commented Sep 9, 2024

An attempt at this (which hasn't been looked at for a long time, so might need fixing) is the following build.sh script

#!/bin/bash

# rm the directories that are created but are also in .gitignore
rm -rf CGAL-5.6*
rm -rf build
rm -rf src/fastjet/_fastjet_core/

cd fastjet-core
git reset --hard fastjet-3.4.2
git clean -f
cd plugins/SISCone/siscone
git clean -f
cd ../../../
cd ..

cd fastjet-contrib
git clean -f
cd ..

python -m pip install --upgrade --verbose .

@matthewfeickert
Copy link
Member Author

cc @jmduarte and co given Discussion #302

@matthewfeickert
Copy link
Member Author

matthewfeickert commented Sep 13, 2024

A better script:

#!/bin/bash

rm -rf CGAL-5.6*

# c.f. https://gist.github.com/nicktoumpelis/11214362
git submodule foreach --recursive git clean -d -f -x
git submodule foreach --recursive git reset --hard

python -m pip install --upgrade --verbose .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant