update
This commit is contained in:
parent
32fe20fe6a
commit
4ac226192a
2
.github/workflows/setup_docker.yml
vendored
2
.github/workflows/setup_docker.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
||||
with:
|
||||
ref: ${{ github.ref_name }}
|
||||
- name: Create Virtual Environment
|
||||
run: pyenv virtualenv "$(git rev-parse --short "$GITHUB_SHA")"
|
||||
run: /home/nextzen/.pyenv/bin/pyenv virtualenv "${{ github.ref_name }}-$(git rev-parse --short "$GITHUB_SHA")"
|
||||
|
||||
- name: Install dotenv
|
||||
run: pip install python-dotenv
|
||||
|
17
setup/clean_up_virtualenvs.sh
Executable file
17
setup/clean_up_virtualenvs.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get the current branch name
|
||||
branch_name=$(git rev-parse --abbrev-ref HEAD)
|
||||
|
||||
# Get a list of all virtual environments, filtering out duplicates
|
||||
virtualenvs=$(pyenv virtualenvs | awk '{print $1}' | sort -u)
|
||||
|
||||
# Loop through each virtual environment and delete it if it contains the branch name
|
||||
for venv in $virtualenvs; do
|
||||
if [[ "$venv" == *"$branch_name"* ]]; then
|
||||
echo "Deleting virtual environment: $venv"
|
||||
pyenv virtualenv-delete "$venv" -f
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Virtual environments containing '$branch_name' deleted."
|
Loading…
Reference in New Issue
Block a user