File tree 1 file changed +22
-2
lines changed
1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 44
44
uses : actions/setup-python@v4
45
45
with :
46
46
python-version : |
47
- 3.8
48
47
3.9
49
48
50
49
- name : Install pipenv and pip-versions
92
91
for dir in "${directories[@]}"; do
93
92
counter=$((counter+1))
94
93
echo "--Processing directory $counter '$dir' of total $total"
95
- cd "$dir" && pipenv install ${package_name}~="${CODEFLARE_RELEASE_VERSION}" && pipenv --rm && cd -
94
+ cd "$dir"
95
+ pipfile_python_version=$(grep -E '^python_version' ./Pipfile | cut -d '"' -f 2)
96
+ if [[ "$pipfile_python_version" > 3.8 ]]; then
97
+ #install specified package
98
+ if ! pipenv install ${package_name}~="${CODEFLARE_RELEASE_VERSION}"; then
99
+ echo "Failed to install ${package_name} with version ${CODEFLARE_RELEASE_VERSION} in $dir"
100
+ # exit 1
101
+ fi
102
+ # Lock dependencies, ensuring pre-release are included and clear previous state
103
+ if ! pipenv lock --pre --clear ; then
104
+ echo "Failed to lock dependencies"
105
+ # exit 1
106
+ fi
107
+ # remove virtual env and clear cache
108
+ if ! penv --rm --clear ; then
109
+ echo "Failed to remove virtual environment"
110
+ # exit 1
111
+ fi
112
+ else
113
+ echo "Skipped installtion of ${package_name} with version ${CODEFLARE_RELEASE_VERSION} in $dir"
114
+ fi
115
+ cd -
96
116
echo "$((total-counter)) directories remaining.."
97
117
done
98
118
else
You can’t perform that action at this time.
0 commit comments