Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-27T23:32:32.893Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

update-json-schemas

41 lines · 1.3 KB · text
1#!/usr/bin/env bash
2
3set -euo pipefail
4
5cd "$(dirname "$0")/.." || exit 1
6cd crates/json_schema_store/src/schemas
7
8if [[ $# -gt 1 ]]; then
9    echo "Usage: script/update-json-schemas [schemastore-commit]" >&2
10    exit 1
11fi
12
13UPSTREAM_REF="${1:-master}"
14
15COMMIT="$(curl -sL "https://api.github.com/repos/SchemaStore/schemastore/commits/$UPSTREAM_REF")"
16HASH="$(jq -r '.sha' <<< "$COMMIT")"
17if [[ -z "$HASH" || "$HASH" == "null" ]]; then
18    echo "Failed to resolve SchemaStore/schemastore commit: $UPSTREAM_REF" >&2
19    exit 1
20fi
21
22files=(
23    "tsconfig.json"
24    "package.json"
25)
26for file in "${files[@]}"; do
27    curl -sL "https://raw.githubusercontent.com/SchemaStore/schemastore/$HASH/src/schemas/json/$file" |
28        sed 's|https://json\.schemastore\.org|https://www.schemastore.org|g' > "$file"
29done
30
31SHORT_HASH="${HASH:0:7}"
32DATE="$(jq -r .commit.author.date <<< "$COMMIT" | cut -c1-10)"
33echo
34echo "Updated JSON schemas to [SchemaStore/schemastore@$SHORT_HASH](https://github.com/SchemaStore/schemastore/tree/$HASH) ($DATE)"
35echo
36for file in "${files[@]}"; do
37    echo "- [$file](https://github.com/SchemaStore/schemastore/commits/master/src/schemas/json/$file)" \
38        "@ [$SHORT_HASH](https://raw.githubusercontent.com/SchemaStore/schemastore/$HASH/src/schemas/json/$file)"
39done
40echo
41
Served at tenant.openagents/omega Member data and write actions are omitted.