Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
Adding cdp bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
rpeach-sag committed May 3, 2018
1 parent 7c0e5e1 commit d0bda41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,19 @@ rm "$output\code\initialization.yaml"
cp -r "$PSScriptRoot\docs" "$output\docs"

# Create the bundle
$files = & "$apamaBin\engine_deploy" --outputList stdout src | %{$_ -replace ".*\\src\\lambdas\\",""} | %{$_ -replace "\\","/"}
$files = & "$apamaBin\engine_deploy" --outputList stdout src | %{$_ -replace ".*\\src\\lambdas\\","code/lambdas/"} | %{$_ -replace "\\","/"}
$bundleFileList = $files | %{$_ -replace "(.+)","`t`t`t<include name=`"`$1`"/>"} | Out-String
$bundleResult = cat "$PSScriptRoot\bundles\BundleTemplate.bnd"
$bundleResult = $bundleResult | %{$_ -replace "<%date%>", (Get-Date -UFormat "%Y-%m-%d")}
$bundleResult = $bundleResult | %{$_ -replace "<%version%>", $version}
$bundleResult = $bundleResult | %{$_ -replace "<%fileList%>",$bundleFileList}

$cdpBundle = $bundleResult | %{$_ -replace "<%fileList%>","`t`t`t<include name=`"cdp/Lambdas.cdp`"/>"} | %{$_ -replace "<%displayName%>", "Lambdas CDP"}
$sourceBundle = $bundleResult | %{$_ -replace "<%fileList%>",$bundleFileList} | %{$_ -replace "<%displayName%>", "Lambdas"}

md "$output\bundles" | out-null
# Write out utf8 (no BOM)
[IO.File]::WriteAllLines("$output\bundles\lambdas.bnd", $bundleResult)
[IO.File]::WriteAllLines("$output\bundles\lambdas-CDP.bnd", $cdpBundle)
[IO.File]::WriteAllLines("$output\bundles\lambdas.bnd", $sourceBundle)

cp -r "$PSScriptRoot\misc" "$output\misc"
mv "$output\misc\deploy.bat" "$output\deploy.bat"
Expand Down
4 changes: 2 additions & 2 deletions bundles/BundleTemplate.bnd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<bundle name="Lambdas" display-name="Lambdas" type="monitorscript" singleton="true">
<bundle name="Lambdas" display-name="<%displayName%>" type="monitorscript" singleton="true">
<version>
<id><%version%></id>
<date><%date%></date>
Expand All @@ -10,7 +10,7 @@
Functional Lambdas for EPL
</description>
<monitors>
<fileset dir="${LAMBDAS_HOME}/code/lambdas">
<fileset dir="${LAMBDAS_HOME}">
<%fileList%>
</fileset>
</monitors>
Expand Down

0 comments on commit d0bda41

Please sign in to comment.