Skip to content

Commit

Permalink
chore: split up make clean target (#1029)
Browse files Browse the repository at this point in the history
* split up make clean targets
  • Loading branch information
gphorvath authored Sep 17, 2024
1 parent 6a0038a commit 2d9cff2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 16 deletions.
18 changes: 2 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,8 @@ help: ## Display this help information
| sort | awk 'BEGIN {FS = ":.*?## "}; \
{printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

clean: ## Clean up all the things (test artifacts, packages, build dirs, compiled .whl files, python eggs)
-rm -rf .env .env.email .env.password .pytest_cache
-rm -rf .logs
-rm -rf ./packages/**/.model/
-rm -rf ./**/__pycache__/
-rm -rf ./**/.ruff_cache ./.ruff_cache
-rm zarf-package-*.tar.zst
-rm packages/**/zarf-package-*.tar.zst
-rm -rf build/*
-rm -rf src/**/build/*
-rm -rf packages/**/build/*
find . -name 'uds-bundle-*-*.tar.zst' -delete
find . -type d -name 'zarf-sbom' -exec rm -rf {} +
find . -name '*.whl' -delete
find . -type d -name '*.egg-info' -exec rm -rf {} +

## Clean up targets for test artifacts, cachce, etc.
include mk-clean.mk

gen-python: ## Generate the protobufs for the OpenAI typing within the leapfrogai_api module
python3 -m grpc_tools.protoc -I src/leapfrogai_sdk/proto \
Expand Down
29 changes: 29 additions & 0 deletions mk-clean.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

clean-all: clean-artifacts clean-cache clean-env clean-logs clean-models


clean-artifacts: # Zarf packages, UDS bundles, Python build artifacts, etc.
-rm zarf-package-*.tar.zst
-rm packages/**/zarf-package-*.tar.zst
-rm -rf build/*
-rm -rf src/**/build/*
-rm -rf packages/**/build/*
find . -name 'uds-bundle-*-*.tar.zst' -delete
find . -type d -name 'zarf-sbom' -exec rm -rf {} +
find . -name '*.whl' -delete
find . -type d -name '*.egg-info' -exec rm -rf {} +

clean-cache:
-rm -rf ./**/__pycache__/
-rm -rf ./**/.ruff_cache ./.ruff_cache

clean-env:
rm -f .env
rm -f .env.email
rm -f .env.password

clean-logs:
-rm -rf ./.logs/

clean-models:
-rm -rf ./packages/**/.model/

0 comments on commit 2d9cff2

Please sign in to comment.