Skip to content

Instantly share code, notes, and snippets.

@gertd
Created Sep 29, 2021
Embed
What would you like to do?
aserto-runtime-blog-example-1
package main
import (
"context"
"os"
"github.com/aserto-dev/runtime"
"github.com/rs/zerolog"
)
func main() {
logger := zerolog.New(os.Stdout).
With().Timestamp().Logger().Level(zerolog.ErrorLevel)
ctx := context.Background()
// Create a runtime
r, cleanup, _ := runtime.NewRuntime(
ctx,
&logger,
&runtime.Config{},
)
defer cleanup()
// Use the runtime to build a bundle from the current directory
r.Build(runtime.BuildParams{
OutputFile: "my-bundle.tar.gz",
}, []string{"."})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment