Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
workspace(name = "typedb_docs")

load("//dependencies/typedb:artifacts.bzl", "typedb_artifacts")

# Load TypeDB artifacts
typedb_artifacts()
41 changes: 41 additions & 0 deletions dependencies/typedb/artifacts.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
"""
TypeDB artifact loading utilities for Bazel.

This module provides functions to load TypeDB artifacts from remote URLs.
"""

def typedb_artifact(name, url, sha256 = None, strip_prefix = None):
"""
Loads a TypeDB artifact from a remote URL.

Args:
name: The name of the artifact target
url: The URL to download the artifact from
sha256: Optional SHA256 checksum of the artifact
strip_prefix: Optional prefix to strip from the downloaded archive
"""

native.http_archive(
name = name,
url = url,
sha256 = sha256,
strip_prefix = strip_prefix,
)

def typedb_artifacts():
"""
Loads all standard TypeDB artifacts.

This function can be extended to load multiple TypeDB artifacts
with predefined configurations.
"""

# Example TypeDB Core artifact
# typedb_artifact(
# name = "typedb_core",
# url = "https://github.com/vaticle/typedb/releases/download/VERSION/typedb-all-linux.tar.gz",
# sha256 = "...",
# strip_prefix = "typedb-all-linux",
# )

pass