Skip to content

Commit

Permalink
update workflow to support basedmypy
Browse files Browse the repository at this point in the history
  • Loading branch information
KotlinIsland committed Dec 13, 2024
1 parent 09677a9 commit fb79546
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
9 changes: 8 additions & 1 deletion sandbox/add_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@ set -x

mkdir "$cloud_functions_dir"
cd "$cloud_functions_dir"
echo "mypy==${version}
case $version in
"basedmypy-"*)
echo "basedmypy==${version#basedmypy-}" > "requirements.in"
;;
*)
echo "mypy==${version}
typing-extensions" > "requirements.in"
;;
esac
pip-compile
ln -s ../main.py ./
cd "$sandbox_dir"
Expand Down
1 change: 1 addition & 0 deletions sandbox/docker/basedmypy-latest
16 changes: 12 additions & 4 deletions sandbox/update_latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,19 @@ fi

set -u
readonly version="$1"
case $version in
basedmypy-*)
readonly latest=./basedmypy-latest
;;
*)
readonly latest=./latest
;;
esac

cd "${sandbox_dir}/cloud_functions"
rm latest
ln -s "$version" ./latest
rm $latest
ln -s "$version" $latest

cd "${sandbox_dir}/docker"
rm latest
ln -s "$version" ./latest
rm $latest
ln -s "$version" $latest

0 comments on commit fb79546

Please sign in to comment.