Skip to content

Commit 5da322d

Browse files
committed
fix bug in copyjar that happens in tagged releases due to multiple files that match pattern (microsoft#422)
1 parent 7106834 commit 5da322d

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

build/copyjar.ps1

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,9 @@ foreach($file in $files)
3535
write-output "Name of the file to copy: $sourceFileName"
3636
}
3737

38-
#uber-jar has the name from pom.xml - this is the name we want to use
39-
$files = get-childitem $configPath -filter "spark*"
40-
#only one file in $files
41-
foreach($file in $files)
42-
{
43-
$destFileName = $file.Name
44-
write-output "Name of the file to use in destination: $destFileName"
45-
}
38+
$pattern = "^original-(.*)"
39+
$destFileName = $sourceFileName -replace $pattern,'$1'
40+
write-output "Name of the file to use in destination: $destFileName"
4641

4742
copy-item $sourceFileName -Destination "$destDir\$destFileName"
4843
popd

0 commit comments

Comments
 (0)