Skip to content

Commit eef0f39

Browse files
claude: Download verapdf from S3 bucket instead of verapdf.org
Change `quarto install verapdf` to download from the quarto S3 bucket using the version pinned in configuration, instead of fetching the latest version from the verapdf.org API. This counters intermittent CI failures due to verapdf.org availability issues. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent fbadcc2 commit eef0f39

1 file changed

Lines changed: 8 additions & 19 deletions

File tree

‎src/tools/impl/verapdf.ts‎

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ import {
2121
import { createToolSymlink, removeToolSymlink } from "../tools.ts";
2222
import { isWindows } from "../../deno_ral/platform.ts";
2323

24-
// veraPDF version API
25-
const kVersionApiUrl = "https://software.verapdf.org/get-latest-version.php";
24+
// S3 bucket for veraPDF downloads
25+
const kBucketBaseUrl = "https://s3.amazonaws.com/rstudio-buildtools/quarto";
26+
const kDefaultVersion = "1.28.2";
2627

2728
// Supported Java versions for veraPDF
2829
const kSupportedJavaVersions = [8, 11, 17, 21];
@@ -119,27 +120,15 @@ function noteInstalledVersion(version: string): void {
119120
}
120121

121122
async function latestRelease(): Promise<RemotePackageInfo> {
122-
const response = await fetch(kVersionApiUrl);
123-
if (!response.ok) {
124-
throw new Error(
125-
`Failed to fetch veraPDF version info: ${response.statusText}`,
126-
);
127-
}
128-
129-
const data = await response.json();
130-
if (!data.success) {
131-
throw new Error("Failed to fetch veraPDF version info from API");
132-
}
133-
134-
const greenfield = data.releases.greenfield;
135-
const versionMatch = greenfield.filename.match(/(\d+\.\d+\.\d+)/);
136-
const version = versionMatch ? versionMatch[1] : "unknown";
137-
const downloadUrl = `https://software.verapdf.org${greenfield.path}`;
123+
// Use pinned version from configuration or default
124+
const version = Deno.env.get("VERAPDF") || kDefaultVersion;
125+
const filename = `verapdf-greenfield-${version}-installer.zip`;
126+
const downloadUrl = `${kBucketBaseUrl}/verapdf/${version}/${filename}`;
138127

139128
return {
140129
url: downloadUrl,
141130
version,
142-
assets: [{ name: greenfield.filename, url: downloadUrl }],
131+
assets: [{ name: filename, url: downloadUrl }],
143132
};
144133
}
145134

0 commit comments

Comments
 (0)