Add mepo reset command
This release adds a new mepo reset
command:
❯ mepo reset -h
usage: mepo reset [-h] [-f] [--reclone] [-n]
Reset the current mepo clone to the original state.This will delete all subrepos and does not check for uncommitted changes! Must be run in the root of
the mepo clone.
options:
-h, --help show this help message and exit
-f, --force Force action.
--reclone Reclone repos after reset.
-n, --dry-run Dry-run only
By default, it will not re-clone a repo and will require a user to answer another question to run (without force flag):
❯ mepo clone
Initializing mepo using components.yaml
ESMA_env | (t) v4.8.0
ESMA_cmake | (t) v3.21.0
ecbuild | (t) geos/v1.3.0
❯ mepo reset
Are you sure you want to reset the project? If so, type 'yes' and press enter. yes
Removing ESMA_cmake/ecbuild...done.
Removing ESMA_cmake...done.
Removing ESMA_env...done.
Removing .mepo...done.
❯ ls -1 ESMA_env | head -1
ls: ESMA_env: No such file or directory
You can do a reclone with --reclone
:
❯ mepo clone
Initializing mepo using components.yaml
ESMA_env | (t) v4.8.0
ESMA_cmake | (t) v3.21.0
ecbuild | (t) geos/v1.3.0
❯ mepo reset --reclone -f
Removing ESMA_cmake/ecbuild...done.
Removing ESMA_cmake...done.
Removing ESMA_env...done.
Removing .mepo...done.
Re-cloning all subrepos
Initializing mepo using components.yaml
ESMA_env | (t) v4.8.0
ESMA_cmake | (t) v3.21.0
ecbuild | (t) geos/v1.3.0
Recloning done.
❯ ls -1 ESMA_env | head -1
BASEDIR.rc.in
Note we also require the user to be in the root of a fixture:
❯ mepo clone
Initializing mepo using components.yaml
ESMA_env | (t) v4.8.0
ESMA_cmake | (t) v3.21.0
ecbuild | (t) geos/v1.3.0
❯ cd ESMA_cmake/ecbuild
❯ mepo reset
Error! As a safety precaution, you must be in the root directory of the project to reset
What's Changed
- Gitflow. Main to develop by @mathomp4 in #243
- Add new reset command by @mathomp4 in #245
- Update GitHub Actions by @mathomp4 in #247
- GitFlow: Merge Develop into Main For Release by @mathomp4 in #246
Full Changelog: v1.47.0...v1.48.0