Skip to content

Commit

Permalink
Fix mill version detection
Browse files Browse the repository at this point in the history
  • Loading branch information
WojciechMazur committed Sep 21, 2024
1 parent 4b88225 commit 20fa752
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions project-builder/mill/prepare-project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,18 @@ else
for v in $MILL_0_12 $MILL_0_11 $MILL_0_10 $MILL_0_9; do
if `${scriptDir}/millw --mill-version $v $RESOLVE > /dev/null 2>/dev/null`; then
echo "Successfully applied build using mill $v"
millVersion=$v
break
buildScVersions=($MILL_0_11 $MILL_0_10 $MILL_0_9)
if [[ " ${buildScVersions[*]} " =~ " ${v} " && -f ./build.sc ]]; then
echo "Found build.sc file and matching Mill version"
millVersion=$v
break
elif [[ -f ./build.mill ]]; then
echo "Found build.mill file"
millVersion=$v
break
else
echo "Able to resolve build, but not found matching build files"
fi
else
echo "Failed to apply build using mill $v"
fi
Expand Down

0 comments on commit 20fa752

Please sign in to comment.