Skip to content

Commit 1ca76ad

Browse files
committed
chore: update swagger and generated files by renovate
1 parent 1b33465 commit 1ca76ad

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

renovate.json

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,30 @@
44
"labels": ["dependencies"],
55
"prConcurrentLimit": 3,
66
"timezone": "Europe/London",
7-
"schedule": ["after 01:00 and before 07:00 every weekday"]
7+
"schedule": ["after 01:00 and before 07:00 every weekday"],
8+
"customManagers": [
9+
{
10+
"customType": "regex",
11+
"fileMatch": ["^scripts/generate-swagger\\.ts$"],
12+
"matchStrings": [
13+
"REGISTRY_SERVER_VERSION\\s*=\\s*[\"'](?<currentValue>v[\\d.]+)[\"']"
14+
],
15+
"depNameTemplate": "stacklok/toolhive-registry-server",
16+
"datasourceTemplate": "github-releases"
17+
}
18+
],
19+
"packageRules": [
20+
{
21+
"matchDepNames": ["stacklok/toolhive-registry-server"],
22+
"postUpgradeTasks": {
23+
"commands": [
24+
"pnpm install",
25+
"pnpm run generate-client",
26+
"pnpm run format"
27+
],
28+
"fileFilters": ["swagger.json", "src/generated/**/*"],
29+
"executionMode": "branch"
30+
}
31+
}
32+
]
833
}

scripts/generate-swagger.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import { execSync } from "node:child_process";
33
import { writeFile } from "node:fs/promises";
44
import * as path from "node:path";
55

6+
const REGISTRY_SERVER_VERSION = "v0.3.9";
7+
68
(async () => {
7-
const url =
8-
"https://raw.githubusercontent.com/stacklok/toolhive-registry-server/refs/heads/main/docs/thv-registry-api/swagger.json";
9+
const url = `https://raw.githubusercontent.com/stacklok/toolhive-registry-server/refs/tags/${REGISTRY_SERVER_VERSION}/docs/thv-registry-api/swagger.json`;
910
const dest = path.resolve("./swagger.json");
1011

1112
console.log(`Fetching OpenAPI spec from: ${url}`);

0 commit comments

Comments
 (0)