adding powershell script to copy non-uber jar to runtime folder
This commit is contained in:
Родитель
6a18f45662
Коммит
1d1a31873c
|
@ -91,7 +91,8 @@ if %ERRORLEVEL% NEQ 0 (
|
|||
)
|
||||
|
||||
@echo SparkCLR Scala binaries
|
||||
copy /y target\spark*.jar "%SPARKCLR_HOME%\lib\"
|
||||
@rem copy non-uber jar to runtime\lib folder
|
||||
powershell -f ..\build\copyjar.ps1
|
||||
popd
|
||||
|
||||
@REM Any .jar files under the lib directory will be copied to the staged runtime lib tree.
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
function Get-ScriptDirectory
|
||||
{
|
||||
$Invocation = (Get-Variable MyInvocation -Scope 1).Value;
|
||||
if($Invocation.PSScriptRoot)
|
||||
{
|
||||
$Invocation.PSScriptRoot;
|
||||
}
|
||||
Elseif($Invocation.MyCommand.Path)
|
||||
{
|
||||
Split-Path $Invocation.MyCommand.Path
|
||||
}
|
||||
else
|
||||
{
|
||||
$Invocation.InvocationName.Substring(0,$Invocation.InvocationName.LastIndexOf("\"));
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# main body of the script
|
||||
# this script copies jar file for the release
|
||||
#
|
||||
$scriptDir= Get-ScriptDirectory
|
||||
write-output "Script directory: $scriptDir"
|
||||
$destDir = "$scriptDir\runtime\lib"
|
||||
write-output "Directory to which file will be copied to: $destDir"
|
||||
pushd ..\scala\target
|
||||
|
||||
#non-uber jar has original prefix - this is the file that needs to be copied over
|
||||
$files = get-childitem $configPath -filter "original*"
|
||||
|
||||
#only one file in $files
|
||||
foreach($file in $files)
|
||||
{
|
||||
$sourceFileName = $file.Name
|
||||
write-output "Name of the file to copy: $sourceFileName"
|
||||
}
|
||||
|
||||
#uber-jar has the name from pom.xml - this is the name we want to use
|
||||
$files = get-childitem $configPath -filter "spark*"
|
||||
#only one file in $files
|
||||
foreach($file in $files)
|
||||
{
|
||||
$destFileName = $file.Name
|
||||
write-output "Name of the file to use in destination: $destFileName"
|
||||
}
|
||||
|
||||
copy-item $sourceFileName -Destination "$destDir\$destFileName"
|
||||
popd
|
Загрузка…
Ссылка в новой задаче