Skip to content

Commit

Permalink
Support rebuilding tests in dotc, be smart about sbt incremental comp…
Browse files Browse the repository at this point in the history
…ilation.
  • Loading branch information
DarkDimius committed May 27, 2015
1 parent e6508e7 commit f870c31
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/dotc
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,20 @@ function checkjar {
echo "The required jar file was built successfully."
fi
else
NEW_FILES="$(find "$DOTTY_ROOT/src" -iname "*.scala" -newer "$1")"
NEW_FILES="$(find "$DOTTY_ROOT/$3" -iname "*.scala" -newer "$1")"
if [ ! -z "$NEW_FILES" ];
then
echo "new files detected. rebuilding"
cd $DOTTY_ROOT
sbt $2
touch "$1"
cd -
fi
fi
}

checkjar $MAIN_JAR package
checkjar $TEST_JAR test:package
checkjar $MAIN_JAR package src
checkjar $TEST_JAR test:package test

# Autodetecting the scala-library location, in case it wasn't provided by an environment variable
if [ "$SCALA_LIBRARY_JAR" == "" ]
Expand Down

0 comments on commit f870c31

Please sign in to comment.