Skip to content
Merged
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
8 changes: 4 additions & 4 deletions build-archived-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ VERSION="${1:?Usage: $0 <version-tag> [--ogx-dir <path>]}"
REPO_DIR="$(cd "$(dirname "$0")" && pwd)"

# Parse optional arguments
LLAMA_STACK_DIR=""
OGX_DIR=""
shift
while [[ $# -gt 0 ]]; do
case $1 in
--ogx-dir) LLAMA_STACK_DIR="$2"; shift 2 ;;
--ogx-dir) OGX_DIR="$2"; shift 2 ;;
*) echo "Unknown option: $1"; exit 1 ;;
esac
done
Expand All @@ -32,9 +32,9 @@ trap 'rm -rf "$TEMP_DIR"' EXIT
echo "=== Building archived version $VERSION ==="

# Step 1: Get ogx at the specified version
if [ -n "$LLAMA_STACK_DIR" ] && [ -d "$LLAMA_STACK_DIR" ]; then
if [ -n "$OGX_DIR" ] && [ -d "$OGX_DIR" ]; then
echo "--- Cloning from local repo ---"
git clone --local --no-checkout "$LLAMA_STACK_DIR" "$TEMP_DIR/ogx"
git clone --local --no-checkout "$OGX_DIR" "$TEMP_DIR/ogx"
cd "$TEMP_DIR/ogx"
git checkout "$VERSION" 2>/dev/null || git checkout "tags/$VERSION"
else
Expand Down
8 changes: 4 additions & 4 deletions build-latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ set -euo pipefail
# Usage: ./build-latest.sh [--ogx-dir <path>] [--branch <branch>] [--output-dir <path>]

REPO_DIR="$(cd "$(dirname "$0")" && pwd)"
LLAMA_STACK_DIR=""
OGX_DIR=""
BRANCH="main"
OUTPUT_DIR="$REPO_DIR/docs"

while [[ $# -gt 0 ]]; do
case $1 in
--ogx-dir) LLAMA_STACK_DIR="$2"; shift 2 ;;
--ogx-dir) OGX_DIR="$2"; shift 2 ;;
--branch) BRANCH="$2"; shift 2 ;;
--output-dir) OUTPUT_DIR="$2"; shift 2 ;;
*) echo "Unknown option: $1"; exit 1 ;;
Expand All @@ -26,9 +26,9 @@ trap 'rm -rf "$TEMP_DIR"' EXIT
echo "=== Building latest docs (branch: $BRANCH) ==="

# Step 1: Get ogx source
if [ -n "$LLAMA_STACK_DIR" ] && [ -d "$LLAMA_STACK_DIR" ]; then
if [ -n "$OGX_DIR" ] && [ -d "$OGX_DIR" ]; then
echo "--- Cloning from local repo (branch: $BRANCH) ---"
git clone --local --no-checkout "$LLAMA_STACK_DIR" "$TEMP_DIR/ogx"
git clone --local --no-checkout "$OGX_DIR" "$TEMP_DIR/ogx"
cd "$TEMP_DIR/ogx"
git checkout "$BRANCH"
else
Expand Down
4 changes: 0 additions & 4 deletions inline-raw-loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ def inline_raw_loader(versioned_dir, repo_root):
imported_content = imported_content.replace(
"](README.md)", "](https://github.com/ogx-ai/ogx#community)"
)
imported_content = imported_content.replace(
"](llama_stack/",
"](https://github.com/ogx-ai/ogx/blob/main/llama_stack/",
)

# Escape MDX-incompatible syntax in imported content
imported_content = escape_for_mdx(imported_content)
Expand Down
Loading