Repository: spark Updated Branches: refs/heads/branch-2.0 21daee439 -> cb3bb1901
[SPARK-15851][BUILD] Fix the call of the bash script to enable proper run in Windows ## What changes were proposed in this pull request? The way bash script `build/spark-build-info` is called from core/pom.xml prevents Spark building on Windows. Instead of calling the script directly we call bash and pass the script as an argument. This enables running it on Windows with bash installed which typically comes with Git. This brings https://github.com/apache/spark/pull/13612 up-to-date and also addresses comments from the code review. Closes #13612 ## How was this patch tested? I built manually (on a Mac) to verify it didn't break Mac compilation. Author: Reynold Xin <[email protected]> Author: avulanov <[email protected]> Closes #13691 from rxin/SPARK-15851. (cherry picked from commit 5a52ba0f952b21818ed73cb253381f6a3799dc46) Signed-off-by: Reynold Xin <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/cb3bb190 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/cb3bb190 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/cb3bb190 Branch: refs/heads/branch-2.0 Commit: cb3bb1901dfb6dca2e190b1b0e8fe37aba76413c Parents: 21daee4 Author: Reynold Xin <[email protected]> Authored: Wed Jun 15 20:11:23 2016 -0700 Committer: Reynold Xin <[email protected]> Committed: Wed Jun 15 20:12:06 2016 -0700 ---------------------------------------------------------------------- core/pom.xml | 3 ++- project/SparkBuild.scala | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/cb3bb190/core/pom.xml ---------------------------------------------------------------------- diff --git a/core/pom.xml b/core/pom.xml index 90c8f97..b1f0b03 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -357,7 +357,8 @@ <configuration> <!-- Execute the shell script to generate the spark build information. --> <target> - <exec executable="${project.basedir}/../build/spark-build-info"> + <exec executable="bash"> + <arg value="${project.basedir}/../build/spark-build-info"/> <arg value="${project.build.directory}/extra-resources"/> <arg value="${project.version}"/> </exec> http://git-wip-us.apache.org/repos/asf/spark/blob/cb3bb190/project/SparkBuild.scala ---------------------------------------------------------------------- diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index 2f7da31..bce7f1d 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -458,7 +458,7 @@ object Core { resourceGenerators in Compile += Def.task { val buildScript = baseDirectory.value + "/../build/spark-build-info" val targetDir = baseDirectory.value + "/target/extra-resources/" - val command = buildScript + " " + targetDir + " " + version.value + val command = Seq("bash", buildScript, targetDir, version.value) Process(command).!! val propsFile = baseDirectory.value / "target" / "extra-resources" / "spark-version-info.properties" Seq(propsFile) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
