| #!/usr/bin/env bash |
| |
| # |
| # Copyright 2022 The Blaze Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # |
| set -ex |
| |
| PROJECT_DIR="$(cd "`dirname "$0"`/.."; pwd)" |
| |
| CHECK="false" |
| while (( "$#" )); do |
| case $1 in |
| --check) |
| CHECK="true" |
| ;; |
| esac |
| shift |
| done |
| |
| sparkver=(spark-3.0 spark-3.1 spark-3.2 spark-3.3 spark-3.4 spark-3.5) |
| |
| MODE=pre |
| for ver in ${sparkver[@]} |
| do |
| SHIM=$ver |
| if [[ "$CHECK" == "true" ]]; then |
| mvn compile test-compile scalafix:scalafix -Dscalafix.mode=CHECK -Dscalafix.skipTest=true -P"${SHIM}" -P"${MODE}" |
| else |
| mvn compile test-compile scalafix:scalafix -P"${SHIM}" -P"${MODE}" |
| fi |
| done |
| |
| |