Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipenvアップデート #4065

Merged
merged 4 commits into from
Jun 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ WORKDIR /usr/src/app

COPY .npmrc .npmrc
COPY Pipfile Pipfile
COPY Pipfile.lock Pipfile.lock
COPY package.json package.json
COPY package-lock.json package-lock.json

Expand All @@ -32,11 +33,11 @@ RUN apt-get update && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update && \
apt-get install -y --no-install-recommends nodejs && \
pip install pipenv==2023.12.1 --no-cache-dir && \
pip install pipenv==2024.0.1 --no-cache-dir && \
if [ "${ENV}" = 'dev' ]; then \
pipenv install --system --skip-lock --dev; \
pipenv install --system --dev; \
else \
pipenv install --system --skip-lock; \
pipenv install --system; \
fi && \
npm install && \
pip uninstall -y pipenv virtualenv && \
Expand Down
12 changes: 12 additions & 0 deletions scripts/pr_format/pr_format/install_pipenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,15 @@ else
fi

pip install "${package_name_with_version}"

if [ -f ${file_name} ]; then
new_version="$(pip list --outdated | grep pipenv || true)"
new_version="$(echo -e "${new_version}" | awk '{print $3}')"
if [ -n "${new_version}" ]; then
PATTERN_BEFORE="${package_name}[^ ]+"
PATTERN_AFTER="${package_name}==${new_version}"
sed -i -E "s/${PATTERN_BEFORE}/${PATTERN_AFTER}/g" ${file_name}
pip install "${package_name}==${new_version}"
exit 1
fi
fi
Loading