Skip to content

Commit

Permalink
venv: BRANCH variable can be used as an override
Browse files Browse the repository at this point in the history
This should make the testing of PRs before landing them more viable.

Signed-off-by: Rune Morling <[email protected]>
  • Loading branch information
ermo committed Jun 29, 2024
1 parent 9c1394d commit 155a829
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion eopkg_venv_functions.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ set -euo pipefail

source shared_functions.bash

# allow user to override branch name
EOPKG_BRANCH="${BRANCH:-main}"

function prepare_venv () {
if [[ -z "${PY3}" ]]; then
die "Couldn't find supported python3 (3.11 || 3.12 || 3.10) interpreter, exiting!"
Expand All @@ -15,7 +18,7 @@ function prepare_venv () {
# Assume the user starts in the eopkg dir
printInfo "Updating the eopkg git repo ..."
# ensure we show the current branch
git fetch && git checkout main && git pull && git branch
git fetch && git checkout "${EOPKG_BRANCH}" && git pull && git branch

printInfo "Set up a clean eopkg_venv venv ..."
${PY3} -m venv --system-site-packages --clear eopkg_venv
Expand Down

0 comments on commit 155a829

Please sign in to comment.