From 8add53fa561a425a16ede9be180d294c0724478d Mon Sep 17 00:00:00 2001 From: skaarthik Date: Sat, 9 Jan 2016 17:54:51 -0800 Subject: [PATCH] consolidating build scripts in one directory --- README.md | 6 +++--- Build.cmd => build/Build.cmd | 10 +++++----- RunSamples.cmd => build/RunSamples.cmd | 0 build.sh => build/build.sh | 6 +++--- downloadtools.ps1 => build/downloadtools.ps1 | 4 ++-- precheck.cmd => build/precheck.cmd | 0 run-samples.sh => build/run-samples.sh | 2 +- {scripts => build}/zipdir.ps1 | 0 CONTRIBUTING.md => notes/CONTRIBUTING.md | 0 linux-instructions.md => notes/linux-instructions.md | 0 .../windows-instructions.md | 0 11 files changed, 14 insertions(+), 14 deletions(-) rename Build.cmd => build/Build.cmd (93%) rename RunSamples.cmd => build/RunSamples.cmd (100%) rename build.sh => build/build.sh (96%) rename downloadtools.ps1 => build/downloadtools.ps1 (99%) rename precheck.cmd => build/precheck.cmd (100%) rename run-samples.sh => build/run-samples.sh (97%) rename {scripts => build}/zipdir.ps1 (100%) rename CONTRIBUTING.md => notes/CONTRIBUTING.md (100%) rename linux-instructions.md => notes/linux-instructions.md (100%) rename windows-instructions.md => notes/windows-instructions.md (100%) diff --git a/README.md b/README.md index fec190c..9409455 100644 --- a/README.md +++ b/README.md @@ -63,8 +63,8 @@ Refer to the [docs folder](docs). ## Building, Running and Debugging SparkCLR -* [Windows Instructions](windows-instructions.md) -* [Linux Instructions](linux-instructions.md) +* [Windows Instructions](notes/windows-instructions.md) +* [Linux Instructions](notes/linux-instructions.md) (Note: Tested only with Spark 1.5.2) @@ -79,4 +79,4 @@ SparkCLR is licensed under the MIT license. See [LICENSE](LICENSE) file for full [![Issue Stats](http://issuestats.com/github/Microsoft/SparkCLR/badge/pr)](http://issuestats.com/github/Microsoft/SparkCLR) [![Issue Stats](http://issuestats.com/github/Microsoft/SparkCLR/badge/issue)](http://issuestats.com/github/Microsoft/SparkCLR) -We welcome contributions. To contribute, follow the instructions in [CONTRIBUTING.md](CONTRIBUTING.md). +We welcome contributions. To contribute, follow the instructions in [CONTRIBUTING.md](notes/CONTRIBUTING.md). diff --git a/Build.cmd b/build/Build.cmd similarity index 93% rename from Build.cmd rename to build/Build.cmd index 33997fc..e4e9ac7 100644 --- a/Build.cmd +++ b/build/Build.cmd @@ -1,4 +1,4 @@ -@echo OFF +REM @echo OFF setlocal @rem check prerequisites @@ -35,7 +35,7 @@ if NOT EXIST "%SPARKCLR_HOME%\samples" mkdir "%SPARKCLR_HOME%\samples" if NOT EXIST "%SPARKCLR_HOME%\scripts" mkdir "%SPARKCLR_HOME%\scripts" @echo Assemble SparkCLR Scala components -pushd "%CMDHOME%\scala" +pushd "%CMDHOME%\..\scala" @rem clean the target directory first call mvn.cmd clean @@ -67,7 +67,7 @@ if EXIST "%CMDHOME%\lib" ( ) @echo Assemble SparkCLR C# components -pushd "%CMDHOME%\csharp" +pushd "%CMDHOME%\..\csharp" @rem clean any possible previous build first call Clean.cmd @@ -92,12 +92,12 @@ copy /y Samples\Microsoft.Spark.CSharp\data\* "%SPARKCLR_HOME%\data\" popd @echo Assemble SparkCLR script components -pushd "%CMDHOME%\scripts" +pushd "%CMDHOME%\..\scripts" copy /y *.cmd "%SPARKCLR_HOME%\scripts\" popd @echo zip run directory pushd %~dp0 if not exist ".\target" (mkdir .\target) -powershell -f .\scripts\zipdir.ps1 -dir "%SPARKCLR_HOME%" -target ".\target\run.zip" +powershell -f .\zipdir.ps1 -dir "%SPARKCLR_HOME%" -target ".\target\run.zip" popd diff --git a/RunSamples.cmd b/build/RunSamples.cmd similarity index 100% rename from RunSamples.cmd rename to build/RunSamples.cmd diff --git a/build.sh b/build/build.sh similarity index 96% rename from build.sh rename to build/build.sh index 1d99f97..0b3d6bc 100755 --- a/build.sh +++ b/build/build.sh @@ -19,7 +19,7 @@ fi [ ! -d "$SPARKCLR_HOME/scripts" ] && mkdir "$SPARKCLR_HOME/scripts" echo "Assemble SparkCLR Scala components" -pushd "$FWDIR/scala" +pushd "$FWDIR/../scala" # clean the target directory first mvn clean -q @@ -53,7 +53,7 @@ then fi echo "Assemble SparkCLR C# components" -pushd "$FWDIR/csharp" +pushd "$FWDIR/../csharp" # clean any possible previous build first ./clean.sh @@ -79,7 +79,7 @@ cp Samples/Microsoft.Spark.CSharp/data/* "$SPARKCLR_HOME/data/" popd echo "Assemble SparkCLR script components" -pushd "$FWDIR/scripts" +pushd "$FWDIR/../scripts" cp *.sh "$SPARKCLR_HOME/scripts/" popd diff --git a/downloadtools.ps1 b/build/downloadtools.ps1 similarity index 99% rename from downloadtools.ps1 rename to build/downloadtools.ps1 index 55cd0ec..1372ba0 100644 --- a/downloadtools.ps1 +++ b/build/downloadtools.ps1 @@ -345,10 +345,10 @@ function Update-SparkVerboseMode # replace {env:TEMP} with temp path $targetFile = "$temp\log4j.properties.temp" - Replace-VariableInFile '\${env:TEMP}' "$tempValue" "$scriptDir\scripts\spark.conf\log4j.properties" $targetFile + Replace-VariableInFile '\${env:TEMP}' "$tempValue" "$scriptDir\..\scripts\spark.conf\log4j.properties" $targetFile # copy customized log4j properties to SPARK_HOME\conf - copy-item $scriptDir\scripts\spark.conf\*.properties $S_HOME\conf -force + copy-item $scriptDir\..\scripts\spark.conf\*.properties $S_HOME\conf -force copy-item $targetFile $S_HOME\conf\log4j.properties -force } else diff --git a/precheck.cmd b/build/precheck.cmd similarity index 100% rename from precheck.cmd rename to build/precheck.cmd diff --git a/run-samples.sh b/build/run-samples.sh similarity index 97% rename from run-samples.sh rename to build/run-samples.sh index 2c42a68..9d31ad8 100755 --- a/run-samples.sh +++ b/build/run-samples.sh @@ -46,7 +46,7 @@ export PATH="$SPARK_HOME/bin:$PATH" if [ ! "$verbose" = "--verbose" ]; then # redirect the logs from console (default) to /tmp - cp "$FWDIR"/scripts/spark.conf/*.properties "$SPARK_HOME/conf/" + cp "$FWDIR"/../scripts/spark.conf/*.properties "$SPARK_HOME/conf/" sed -i "s/\${env:TEMP}/\/tmp/g" "$SPARK_HOME/conf/log4j.properties" else # remove customized log4j.properties, revert back to out-of-the-box Spark logging to console diff --git a/scripts/zipdir.ps1 b/build/zipdir.ps1 similarity index 100% rename from scripts/zipdir.ps1 rename to build/zipdir.ps1 diff --git a/CONTRIBUTING.md b/notes/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to notes/CONTRIBUTING.md diff --git a/linux-instructions.md b/notes/linux-instructions.md similarity index 100% rename from linux-instructions.md rename to notes/linux-instructions.md diff --git a/windows-instructions.md b/notes/windows-instructions.md similarity index 100% rename from windows-instructions.md rename to notes/windows-instructions.md