-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d6b8ee8
commit cf82401
Showing
3 changed files
with
45 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
set -e | ||
set -o pipefail | ||
|
||
if [ -f .python-version ]; then | ||
# Create a temp directory | ||
circleci_temp_dir="$(mktemp -d)" | ||
# Move .python-version out of the directory | ||
mv .python-version "$circleci_temp_dir"/.python-version | ||
fi | ||
|
||
curl "https://bootstrap.pypa.io/get-pip.py" -o "circleci_get_pip.py" | ||
python3 circleci_get_pip.py --user | ||
|
||
python3 -m pip install --user virtualenv | ||
|
||
echo "Create python virtual environment for path-filtering" | ||
virtualenv path-filtering-venv -p /usr/bin/python3 | ||
|
||
echo "Activate python virtual environment" | ||
# shellcheck source=/dev/null | ||
. path-filtering-venv/bin/activate | ||
|
||
echo "${CREATE_PIPELINE_SCRIPT}" > circleci_create_parameters_script.py | ||
|
||
echo "Creating pipeline parameters" | ||
python3 circleci_create_parameters_script.py | ||
|
||
if [ -f "$circleci_temp_dir"/.python-version ]; then | ||
# Move .python-version back | ||
mv "$circleci_temp_dir"/.python-version .python-version | ||
fi | ||
|
||
echo "Deactivate python virtual environment for path-filtering" | ||
deactivate |