Skip to content

Commit 7f496df

Browse files
committed
feat(cmd/rofl): Add bundle-post script
1 parent d3ead17 commit 7f496df

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

build/rofl/manifest.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ const (
3434

3535
// Well-known scripts.
3636
const (
37-
ScriptBuildPre = "build-pre"
38-
ScriptBuildPost = "build-post"
37+
ScriptBuildPre = "build-pre"
38+
ScriptBuildPost = "build-post"
39+
ScriptBundlePost = "bundle-post"
3940
)
4041

4142
// Manifest is the ROFL app manifest that configures various aspects of the app in a single place.

cmd/rofl/build/build.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ var (
7777

7878
// Setup some build environment variables.
7979
os.Setenv("ROFL_MANIFEST", manifest.SourceFileName())
80-
os.Setenv("ROFL_DEPLOYMENT", deploymentName)
80+
os.Setenv("ROFL_DEPLOYMENT_NAME", deploymentName)
8181
os.Setenv("ROFL_DEPLOYMENT_NETWORK", deployment.Network)
8282
os.Setenv("ROFL_DEPLOYMENT_PARATIME", deployment.ParaTime)
8383
os.Setenv("ROFL_TMPDIR", tmpDir)
@@ -132,6 +132,15 @@ var (
132132
return
133133
}
134134

135+
// Setup some post-bundle environment variables.
136+
os.Setenv("ROFL_BUNDLE", outFn)
137+
for idx, enclaveID := range eids {
138+
data, _ := enclaveID.MarshalText()
139+
os.Setenv(fmt.Sprintf("ROFL_ENCLAVE_ID_%d", idx), string(data))
140+
}
141+
142+
runScript(manifest, buildRofl.ScriptBundlePost)
143+
135144
// Override the update manifest flag in case the policy does not exist.
136145
if deployment.Policy == nil {
137146
doUpdate = false

0 commit comments

Comments
 (0)