mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-12-15 11:07:14 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a02a550bdd |
4
dist/setup/index.js
generated
vendored
4
dist/setup/index.js
generated
vendored
@@ -124868,6 +124868,8 @@ const node_fs_1 = __nccwpck_require__(73024);
|
||||
const core = __importStar(__nccwpck_require__(37484));
|
||||
const semver = __importStar(__nccwpck_require__(39318));
|
||||
const fetch_1 = __nccwpck_require__(3385);
|
||||
const node_path_1 = __nccwpck_require__(76760);
|
||||
const localManifestFile = (0, node_path_1.join)(__dirname, "..", "..", "version-manifest.json");
|
||||
async function getLatestKnownVersion(manifestUrl) {
|
||||
const manifestEntries = await getManifestEntries(manifestUrl);
|
||||
return manifestEntries.reduce((a, b) => semver.gt(a.version, b.version) ? a : b).version;
|
||||
@@ -124891,7 +124893,7 @@ async function getManifestEntries(manifestUrl) {
|
||||
}
|
||||
else {
|
||||
core.info("manifest-file not provided, reading from local file.");
|
||||
const fileContent = await node_fs_1.promises.readFile("version-manifest.json");
|
||||
const fileContent = await node_fs_1.promises.readFile(localManifestFile);
|
||||
data = fileContent.toString();
|
||||
}
|
||||
return JSON.parse(data);
|
||||
|
||||
12
dist/update-known-versions/index.js
generated
vendored
12
dist/update-known-versions/index.js
generated
vendored
@@ -62432,6 +62432,8 @@ const node_fs_1 = __nccwpck_require__(3024);
|
||||
const core = __importStar(__nccwpck_require__(7484));
|
||||
const semver = __importStar(__nccwpck_require__(9318));
|
||||
const fetch_1 = __nccwpck_require__(3385);
|
||||
const node_path_1 = __nccwpck_require__(6760);
|
||||
const localManifestFile = (0, node_path_1.join)(__dirname, "..", "..", "version-manifest.json");
|
||||
async function getLatestKnownVersion(manifestUrl) {
|
||||
const manifestEntries = await getManifestEntries(manifestUrl);
|
||||
return manifestEntries.reduce((a, b) => semver.gt(a.version, b.version) ? a : b).version;
|
||||
@@ -62455,7 +62457,7 @@ async function getManifestEntries(manifestUrl) {
|
||||
}
|
||||
else {
|
||||
core.info("manifest-file not provided, reading from local file.");
|
||||
const fileContent = await node_fs_1.promises.readFile("version-manifest.json");
|
||||
const fileContent = await node_fs_1.promises.readFile(localManifestFile);
|
||||
data = fileContent.toString();
|
||||
}
|
||||
return JSON.parse(data);
|
||||
@@ -62840,6 +62842,14 @@ module.exports = require("node:net");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 6760:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = require("node:path");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 643:
|
||||
/***/ ((module) => {
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@ import { promises as fs } from "node:fs";
|
||||
import * as core from "@actions/core";
|
||||
import * as semver from "semver";
|
||||
import { fetch } from "../utils/fetch";
|
||||
import { join } from "node:path";
|
||||
|
||||
const localManifestFile = join(__dirname, "..", "..", "version-manifest.json");
|
||||
|
||||
interface ManifestEntry {
|
||||
version: string;
|
||||
@@ -51,7 +54,7 @@ async function getManifestEntries(
|
||||
data = await response.text();
|
||||
} else {
|
||||
core.info("manifest-file not provided, reading from local file.");
|
||||
const fileContent = await fs.readFile("version-manifest.json");
|
||||
const fileContent = await fs.readFile(localManifestFile);
|
||||
data = fileContent.toString();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user