Skip to content

Commit

Permalink
Add support for Qiskit versions previous to 0.44 (Qiskit#409)
Browse files Browse the repository at this point in the history
This PR adds support for downloading versions of Qiskit previous to
0.44. The old version of Qiskit used
https://qiskit.org/documentation/apidoc/terra.html instead of
https://qiskit.org/documentation/apidoc/index.html
  • Loading branch information
arnaucasau authored Nov 27, 2023
1 parent 9cff6c3 commit 7a241d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/commands/updateApiDocs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ zxMain(async () => {
throw new Error("`--historical` can only be used with `-p qiskit`");
}
pkg.baseUrl = `https://qiskit.org/documentation/stable/${versionWithoutPatch}`;
pkg.initialUrls = [`${pkg.baseUrl}/apidoc/index.html`];
const htmlFile = +versionWithoutPatch >= 0.44 ? "index.html" : "terra.html";
pkg.initialUrls = [`${pkg.baseUrl}/apidoc/${htmlFile}`];
}

const destination = `${getRoot()}/.out/python/sources/${pkg.name}/${
Expand Down

0 comments on commit 7a241d9

Please sign in to comment.