|
|
|
|
@@ -7711,7 +7711,7 @@ function hashFiles(patterns, currentWorkspace = '', options, verbose = false) {
|
|
|
|
|
followSymbolicLinks = options.followSymbolicLinks;
|
|
|
|
|
}
|
|
|
|
|
const globber = yield create(patterns, { followSymbolicLinks });
|
|
|
|
|
return internal_hash_files_1.hashFiles(globber, currentWorkspace, verbose);
|
|
|
|
|
return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
exports.hashFiles = hashFiles;
|
|
|
|
|
@@ -7726,7 +7726,11 @@ exports.hashFiles = hashFiles;
|
|
|
|
|
|
|
|
|
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
|
|
|
if (k2 === undefined) k2 = k;
|
|
|
|
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
|
|
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
|
|
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
|
|
|
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
|
|
|
}
|
|
|
|
|
Object.defineProperty(o, k2, desc);
|
|
|
|
|
}) : (function(o, m, k, k2) {
|
|
|
|
|
if (k2 === undefined) k2 = k;
|
|
|
|
|
o[k2] = m[k];
|
|
|
|
|
@@ -7739,7 +7743,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
@@ -7754,7 +7758,8 @@ function getOptions(copy) {
|
|
|
|
|
followSymbolicLinks: true,
|
|
|
|
|
implicitDescendants: true,
|
|
|
|
|
matchDirectories: true,
|
|
|
|
|
omitBrokenSymbolicLinks: true
|
|
|
|
|
omitBrokenSymbolicLinks: true,
|
|
|
|
|
excludeHiddenFiles: false
|
|
|
|
|
};
|
|
|
|
|
if (copy) {
|
|
|
|
|
if (typeof copy.followSymbolicLinks === 'boolean') {
|
|
|
|
|
@@ -7773,6 +7778,10 @@ function getOptions(copy) {
|
|
|
|
|
result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks;
|
|
|
|
|
core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`);
|
|
|
|
|
}
|
|
|
|
|
if (typeof copy.excludeHiddenFiles === 'boolean') {
|
|
|
|
|
result.excludeHiddenFiles = copy.excludeHiddenFiles;
|
|
|
|
|
core.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
@@ -7788,7 +7797,11 @@ exports.getOptions = getOptions;
|
|
|
|
|
|
|
|
|
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
|
|
|
if (k2 === undefined) k2 = k;
|
|
|
|
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
|
|
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
|
|
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
|
|
|
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
|
|
|
}
|
|
|
|
|
Object.defineProperty(o, k2, desc);
|
|
|
|
|
}) : (function(o, m, k, k2) {
|
|
|
|
|
if (k2 === undefined) k2 = k;
|
|
|
|
|
o[k2] = m[k];
|
|
|
|
|
@@ -7801,7 +7814,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
@@ -7855,19 +7868,21 @@ class DefaultGlobber {
|
|
|
|
|
return this.searchPaths.slice();
|
|
|
|
|
}
|
|
|
|
|
glob() {
|
|
|
|
|
var e_1, _a;
|
|
|
|
|
var _a, e_1, _b, _c;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
const result = [];
|
|
|
|
|
try {
|
|
|
|
|
for (var _b = __asyncValues(this.globGenerator()), _c; _c = yield _b.next(), !_c.done;) {
|
|
|
|
|
const itemPath = _c.value;
|
|
|
|
|
for (var _d = true, _e = __asyncValues(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
|
|
|
|
_c = _f.value;
|
|
|
|
|
_d = false;
|
|
|
|
|
const itemPath = _c;
|
|
|
|
|
result.push(itemPath);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
|
|
|
finally {
|
|
|
|
|
try {
|
|
|
|
|
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
|
|
|
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
|
|
|
}
|
|
|
|
|
finally { if (e_1) throw e_1.error; }
|
|
|
|
|
}
|
|
|
|
|
@@ -7925,6 +7940,10 @@ class DefaultGlobber {
|
|
|
|
|
if (!stats) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// Hidden file or directory?
|
|
|
|
|
if (options.excludeHiddenFiles && path.basename(item.path).match(/^\./)) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// Directory
|
|
|
|
|
if (stats.isDirectory()) {
|
|
|
|
|
// Matched
|
|
|
|
|
@@ -8030,7 +8049,11 @@ exports.DefaultGlobber = DefaultGlobber;
|
|
|
|
|
|
|
|
|
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
|
|
|
if (k2 === undefined) k2 = k;
|
|
|
|
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
|
|
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
|
|
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
|
|
|
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
|
|
|
}
|
|
|
|
|
Object.defineProperty(o, k2, desc);
|
|
|
|
|
}) : (function(o, m, k, k2) {
|
|
|
|
|
if (k2 === undefined) k2 = k;
|
|
|
|
|
o[k2] = m[k];
|
|
|
|
|
@@ -8043,7 +8066,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
@@ -8072,19 +8095,21 @@ const stream = __importStar(__nccwpck_require__(2781));
|
|
|
|
|
const util = __importStar(__nccwpck_require__(3837));
|
|
|
|
|
const path = __importStar(__nccwpck_require__(1017));
|
|
|
|
|
function hashFiles(globber, currentWorkspace, verbose = false) {
|
|
|
|
|
var e_1, _a;
|
|
|
|
|
var _b;
|
|
|
|
|
var _a, e_1, _b, _c;
|
|
|
|
|
var _d;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
const writeDelegate = verbose ? core.info : core.debug;
|
|
|
|
|
let hasMatch = false;
|
|
|
|
|
const githubWorkspace = currentWorkspace
|
|
|
|
|
? currentWorkspace
|
|
|
|
|
: (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd();
|
|
|
|
|
: (_d = process.env['GITHUB_WORKSPACE']) !== null && _d !== void 0 ? _d : process.cwd();
|
|
|
|
|
const result = crypto.createHash('sha256');
|
|
|
|
|
let count = 0;
|
|
|
|
|
try {
|
|
|
|
|
for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) {
|
|
|
|
|
const file = _d.value;
|
|
|
|
|
for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) {
|
|
|
|
|
_c = _g.value;
|
|
|
|
|
_e = false;
|
|
|
|
|
const file = _c;
|
|
|
|
|
writeDelegate(file);
|
|
|
|
|
if (!file.startsWith(`${githubWorkspace}${path.sep}`)) {
|
|
|
|
|
writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`);
|
|
|
|
|
@@ -8107,7 +8132,7 @@ function hashFiles(globber, currentWorkspace, verbose = false) {
|
|
|
|
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
|
|
|
finally {
|
|
|
|
|
try {
|
|
|
|
|
if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c);
|
|
|
|
|
if (!_e && !_a && (_b = _f.return)) yield _b.call(_f);
|
|
|
|
|
}
|
|
|
|
|
finally { if (e_1) throw e_1.error; }
|
|
|
|
|
}
|
|
|
|
|
@@ -8147,7 +8172,7 @@ var MatchKind;
|
|
|
|
|
MatchKind[MatchKind["File"] = 2] = "File";
|
|
|
|
|
/** Matched */
|
|
|
|
|
MatchKind[MatchKind["All"] = 3] = "All";
|
|
|
|
|
})(MatchKind = exports.MatchKind || (exports.MatchKind = {}));
|
|
|
|
|
})(MatchKind || (exports.MatchKind = MatchKind = {}));
|
|
|
|
|
//# sourceMappingURL=internal-match-kind.js.map
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
@@ -8159,7 +8184,11 @@ var MatchKind;
|
|
|
|
|
|
|
|
|
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
|
|
|
if (k2 === undefined) k2 = k;
|
|
|
|
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
|
|
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
|
|
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
|
|
|
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
|
|
|
}
|
|
|
|
|
Object.defineProperty(o, k2, desc);
|
|
|
|
|
}) : (function(o, m, k, k2) {
|
|
|
|
|
if (k2 === undefined) k2 = k;
|
|
|
|
|
o[k2] = m[k];
|
|
|
|
|
@@ -8172,7 +8201,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
@@ -8222,8 +8251,8 @@ exports.dirname = dirname;
|
|
|
|
|
* or `C:` are expanded based on the current working directory.
|
|
|
|
|
*/
|
|
|
|
|
function ensureAbsoluteRoot(root, itemPath) {
|
|
|
|
|
assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`);
|
|
|
|
|
assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`);
|
|
|
|
|
(0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`);
|
|
|
|
|
(0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`);
|
|
|
|
|
// Already rooted
|
|
|
|
|
if (hasAbsoluteRoot(itemPath)) {
|
|
|
|
|
return itemPath;
|
|
|
|
|
@@ -8233,7 +8262,7 @@ function ensureAbsoluteRoot(root, itemPath) {
|
|
|
|
|
// Check for itemPath like C: or C:foo
|
|
|
|
|
if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) {
|
|
|
|
|
let cwd = process.cwd();
|
|
|
|
|
assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
|
|
|
|
|
(0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
|
|
|
|
|
// Drive letter matches cwd? Expand to cwd
|
|
|
|
|
if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) {
|
|
|
|
|
// Drive only, e.g. C:
|
|
|
|
|
@@ -8258,11 +8287,11 @@ function ensureAbsoluteRoot(root, itemPath) {
|
|
|
|
|
// Check for itemPath like \ or \foo
|
|
|
|
|
else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) {
|
|
|
|
|
const cwd = process.cwd();
|
|
|
|
|
assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
|
|
|
|
|
(0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
|
|
|
|
|
return `${cwd[0]}:\\${itemPath.substr(1)}`;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`);
|
|
|
|
|
(0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`);
|
|
|
|
|
// Otherwise ensure root ends with a separator
|
|
|
|
|
if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\'))) {
|
|
|
|
|
// Intentionally empty
|
|
|
|
|
@@ -8279,7 +8308,7 @@ exports.ensureAbsoluteRoot = ensureAbsoluteRoot;
|
|
|
|
|
* `\\hello\share` and `C:\hello` (and using alternate separator).
|
|
|
|
|
*/
|
|
|
|
|
function hasAbsoluteRoot(itemPath) {
|
|
|
|
|
assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`);
|
|
|
|
|
(0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`);
|
|
|
|
|
// Normalize separators
|
|
|
|
|
itemPath = normalizeSeparators(itemPath);
|
|
|
|
|
// Windows
|
|
|
|
|
@@ -8296,7 +8325,7 @@ exports.hasAbsoluteRoot = hasAbsoluteRoot;
|
|
|
|
|
* `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator).
|
|
|
|
|
*/
|
|
|
|
|
function hasRoot(itemPath) {
|
|
|
|
|
assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`);
|
|
|
|
|
(0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`);
|
|
|
|
|
// Normalize separators
|
|
|
|
|
itemPath = normalizeSeparators(itemPath);
|
|
|
|
|
// Windows
|
|
|
|
|
@@ -8364,7 +8393,11 @@ exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator;
|
|
|
|
|
|
|
|
|
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
|
|
|
if (k2 === undefined) k2 = k;
|
|
|
|
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
|
|
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
|
|
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
|
|
|
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
|
|
|
}
|
|
|
|
|
Object.defineProperty(o, k2, desc);
|
|
|
|
|
}) : (function(o, m, k, k2) {
|
|
|
|
|
if (k2 === undefined) k2 = k;
|
|
|
|
|
o[k2] = m[k];
|
|
|
|
|
@@ -8377,7 +8410,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
@@ -8402,7 +8435,7 @@ class Path {
|
|
|
|
|
this.segments = [];
|
|
|
|
|
// String
|
|
|
|
|
if (typeof itemPath === 'string') {
|
|
|
|
|
assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`);
|
|
|
|
|
(0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`);
|
|
|
|
|
// Normalize slashes and trim unnecessary trailing slash
|
|
|
|
|
itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);
|
|
|
|
|
// Not rooted
|
|
|
|
|
@@ -8429,24 +8462,24 @@ class Path {
|
|
|
|
|
// Array
|
|
|
|
|
else {
|
|
|
|
|
// Must not be empty
|
|
|
|
|
assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`);
|
|
|
|
|
(0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`);
|
|
|
|
|
// Each segment
|
|
|
|
|
for (let i = 0; i < itemPath.length; i++) {
|
|
|
|
|
let segment = itemPath[i];
|
|
|
|
|
// Must not be empty
|
|
|
|
|
assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`);
|
|
|
|
|
(0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`);
|
|
|
|
|
// Normalize slashes
|
|
|
|
|
segment = pathHelper.normalizeSeparators(itemPath[i]);
|
|
|
|
|
// Root segment
|
|
|
|
|
if (i === 0 && pathHelper.hasRoot(segment)) {
|
|
|
|
|
segment = pathHelper.safeTrimTrailingSeparator(segment);
|
|
|
|
|
assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`);
|
|
|
|
|
(0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`);
|
|
|
|
|
this.segments.push(segment);
|
|
|
|
|
}
|
|
|
|
|
// All other segments
|
|
|
|
|
else {
|
|
|
|
|
// Must not contain slash
|
|
|
|
|
assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`);
|
|
|
|
|
(0, assert_1.default)(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`);
|
|
|
|
|
this.segments.push(segment);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -8484,7 +8517,11 @@ exports.Path = Path;
|
|
|
|
|
|
|
|
|
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
|
|
|
if (k2 === undefined) k2 = k;
|
|
|
|
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
|
|
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
|
|
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
|
|
|
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
|
|
|
}
|
|
|
|
|
Object.defineProperty(o, k2, desc);
|
|
|
|
|
}) : (function(o, m, k, k2) {
|
|
|
|
|
if (k2 === undefined) k2 = k;
|
|
|
|
|
o[k2] = m[k];
|
|
|
|
|
@@ -8497,7 +8534,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
@@ -8585,7 +8622,11 @@ exports.partialMatch = partialMatch;
|
|
|
|
|
|
|
|
|
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
|
|
|
if (k2 === undefined) k2 = k;
|
|
|
|
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
|
|
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
|
|
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
|
|
|
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
|
|
|
}
|
|
|
|
|
Object.defineProperty(o, k2, desc);
|
|
|
|
|
}) : (function(o, m, k, k2) {
|
|
|
|
|
if (k2 === undefined) k2 = k;
|
|
|
|
|
o[k2] = m[k];
|
|
|
|
|
@@ -8598,7 +8639,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
@@ -8630,9 +8671,9 @@ class Pattern {
|
|
|
|
|
else {
|
|
|
|
|
// Convert to pattern
|
|
|
|
|
segments = segments || [];
|
|
|
|
|
assert_1.default(segments.length, `Parameter 'segments' must not empty`);
|
|
|
|
|
(0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`);
|
|
|
|
|
const root = Pattern.getLiteral(segments[0]);
|
|
|
|
|
assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`);
|
|
|
|
|
(0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`);
|
|
|
|
|
pattern = new internal_path_1.Path(segments).toString().trim();
|
|
|
|
|
if (patternOrNegate) {
|
|
|
|
|
pattern = `!${pattern}`;
|
|
|
|
|
@@ -8726,13 +8767,13 @@ class Pattern {
|
|
|
|
|
*/
|
|
|
|
|
static fixupPattern(pattern, homedir) {
|
|
|
|
|
// Empty
|
|
|
|
|
assert_1.default(pattern, 'pattern cannot be empty');
|
|
|
|
|
(0, assert_1.default)(pattern, 'pattern cannot be empty');
|
|
|
|
|
// Must not contain `.` segment, unless first segment
|
|
|
|
|
// Must not contain `..` segment
|
|
|
|
|
const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x));
|
|
|
|
|
assert_1.default(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);
|
|
|
|
|
(0, assert_1.default)(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);
|
|
|
|
|
// Must not contain globs in root, e.g. Windows UNC path \\foo\b*r
|
|
|
|
|
assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);
|
|
|
|
|
(0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);
|
|
|
|
|
// Normalize slashes
|
|
|
|
|
pattern = pathHelper.normalizeSeparators(pattern);
|
|
|
|
|
// Replace leading `.` segment
|
|
|
|
|
@@ -8742,8 +8783,8 @@ class Pattern {
|
|
|
|
|
// Replace leading `~` segment
|
|
|
|
|
else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) {
|
|
|
|
|
homedir = homedir || os.homedir();
|
|
|
|
|
assert_1.default(homedir, 'Unable to determine HOME directory');
|
|
|
|
|
assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`);
|
|
|
|
|
(0, assert_1.default)(homedir, 'Unable to determine HOME directory');
|
|
|
|
|
(0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`);
|
|
|
|
|
pattern = Pattern.globEscape(homedir) + pattern.substr(1);
|
|
|
|
|
}
|
|
|
|
|
// Replace relative drive root, e.g. pattern is C: or C:foo
|
|
|
|
|
@@ -61018,7 +61059,7 @@ const testSet = (set, version, options) => {
|
|
|
|
|
|
|
|
|
|
const debug = __nccwpck_require__(427)
|
|
|
|
|
const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(2293)
|
|
|
|
|
const { safeRe: re, t } = __nccwpck_require__(9523)
|
|
|
|
|
const { safeRe: re, safeSrc: src, t } = __nccwpck_require__(9523)
|
|
|
|
|
|
|
|
|
|
const parseOptions = __nccwpck_require__(785)
|
|
|
|
|
const { compareIdentifiers } = __nccwpck_require__(2463)
|
|
|
|
|
@@ -61028,7 +61069,7 @@ class SemVer {
|
|
|
|
|
|
|
|
|
|
if (version instanceof SemVer) {
|
|
|
|
|
if (version.loose === !!options.loose &&
|
|
|
|
|
version.includePrerelease === !!options.includePrerelease) {
|
|
|
|
|
version.includePrerelease === !!options.includePrerelease) {
|
|
|
|
|
return version
|
|
|
|
|
} else {
|
|
|
|
|
version = version.version
|
|
|
|
|
@@ -61194,6 +61235,20 @@ class SemVer {
|
|
|
|
|
// preminor will bump the version up to the next minor release, and immediately
|
|
|
|
|
// down to pre-release. premajor and prepatch work the same way.
|
|
|
|
|
inc (release, identifier, identifierBase) {
|
|
|
|
|
if (release.startsWith('pre')) {
|
|
|
|
|
if (!identifier && identifierBase === false) {
|
|
|
|
|
throw new Error('invalid increment argument: identifier is empty')
|
|
|
|
|
}
|
|
|
|
|
// Avoid an invalid semver results
|
|
|
|
|
if (identifier) {
|
|
|
|
|
const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`)
|
|
|
|
|
const match = `-${identifier}`.match(r)
|
|
|
|
|
if (!match || match[1] !== identifier) {
|
|
|
|
|
throw new Error(`invalid identifier: ${identifier}`)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch (release) {
|
|
|
|
|
case 'premajor':
|
|
|
|
|
this.prerelease.length = 0
|
|
|
|
|
@@ -61224,6 +61279,12 @@ class SemVer {
|
|
|
|
|
}
|
|
|
|
|
this.inc('pre', identifier, identifierBase)
|
|
|
|
|
break
|
|
|
|
|
case 'release':
|
|
|
|
|
if (this.prerelease.length === 0) {
|
|
|
|
|
throw new Error(`version ${this.raw} is not a prerelease`)
|
|
|
|
|
}
|
|
|
|
|
this.prerelease.length = 0
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
case 'major':
|
|
|
|
|
// If this is a pre-major version, bump up to the same major version.
|
|
|
|
|
@@ -61267,10 +61328,6 @@ class SemVer {
|
|
|
|
|
case 'pre': {
|
|
|
|
|
const base = Number(identifierBase) ? 1 : 0
|
|
|
|
|
|
|
|
|
|
if (!identifier && identifierBase === false) {
|
|
|
|
|
throw new Error('invalid increment argument: identifier is empty')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.prerelease.length === 0) {
|
|
|
|
|
this.prerelease = [base]
|
|
|
|
|
} else {
|
|
|
|
|
@@ -61529,20 +61586,13 @@ const diff = (version1, version2) => {
|
|
|
|
|
return 'major'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Otherwise it can be determined by checking the high version
|
|
|
|
|
|
|
|
|
|
if (highVersion.patch) {
|
|
|
|
|
// anything higher than a patch bump would result in the wrong version
|
|
|
|
|
// If the main part has no difference
|
|
|
|
|
if (lowVersion.compareMain(highVersion) === 0) {
|
|
|
|
|
if (lowVersion.minor && !lowVersion.patch) {
|
|
|
|
|
return 'minor'
|
|
|
|
|
}
|
|
|
|
|
return 'patch'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (highVersion.minor) {
|
|
|
|
|
// anything higher than a minor bump would result in the wrong version
|
|
|
|
|
return 'minor'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// bumping major/minor/patch all have same result
|
|
|
|
|
return 'major'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// add the `pre` prefix if we are going to a prerelease version
|
|
|
|
|
@@ -62049,6 +62099,7 @@ exports = module.exports = {}
|
|
|
|
|
const re = exports.re = []
|
|
|
|
|
const safeRe = exports.safeRe = []
|
|
|
|
|
const src = exports.src = []
|
|
|
|
|
const safeSrc = exports.safeSrc = []
|
|
|
|
|
const t = exports.t = {}
|
|
|
|
|
let R = 0
|
|
|
|
|
|
|
|
|
|
@@ -62081,6 +62132,7 @@ const createToken = (name, value, isGlobal) => {
|
|
|
|
|
debug(name, index, value)
|
|
|
|
|
t[name] = index
|
|
|
|
|
src[index] = value
|
|
|
|
|
safeSrc[index] = safe
|
|
|
|
|
re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
|
|
|
|
|
safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)
|
|
|
|
|
}
|
|
|
|
|
@@ -93003,13 +93055,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
|
|
}) : function(o, v) {
|
|
|
|
|
o["default"] = v;
|
|
|
|
|
});
|
|
|
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
var __importStar = (this && this.__importStar) || (function () {
|
|
|
|
|
var ownKeys = function(o) {
|
|
|
|
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
|
|
|
var ar = [];
|
|
|
|
|
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
|
|
|
return ar;
|
|
|
|
|
};
|
|
|
|
|
return ownKeys(o);
|
|
|
|
|
};
|
|
|
|
|
return function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
})();
|
|
|
|
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
|
|
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
|
|
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
|
|
|
@@ -93093,13 +93155,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
|
|
}) : function(o, v) {
|
|
|
|
|
o["default"] = v;
|
|
|
|
|
});
|
|
|
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
var __importStar = (this && this.__importStar) || (function () {
|
|
|
|
|
var ownKeys = function(o) {
|
|
|
|
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
|
|
|
var ar = [];
|
|
|
|
|
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
|
|
|
return ar;
|
|
|
|
|
};
|
|
|
|
|
return ownKeys(o);
|
|
|
|
|
};
|
|
|
|
|
return function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
})();
|
|
|
|
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
|
|
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
|
|
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
|
|
|
@@ -93110,7 +93182,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
exports.isCacheFeatureAvailable = exports.isGhes = exports.getCacheDirectoryPath = exports.getPackageManagerInfo = exports.getCommandOutput = void 0;
|
|
|
|
|
exports.getCacheDirectoryPath = exports.getPackageManagerInfo = exports.getCommandOutput = void 0;
|
|
|
|
|
exports.isGhes = isGhes;
|
|
|
|
|
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
|
|
|
|
const cache = __importStar(__nccwpck_require__(7799));
|
|
|
|
|
const core = __importStar(__nccwpck_require__(2186));
|
|
|
|
|
const exec = __importStar(__nccwpck_require__(1514));
|
|
|
|
|
@@ -93160,7 +93234,6 @@ function isGhes() {
|
|
|
|
|
const isLocalHost = hostname.endsWith('.LOCALHOST');
|
|
|
|
|
return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
|
|
|
|
|
}
|
|
|
|
|
exports.isGhes = isGhes;
|
|
|
|
|
function isCacheFeatureAvailable() {
|
|
|
|
|
if (cache.isFeatureAvailable()) {
|
|
|
|
|
return true;
|
|
|
|
|
@@ -93172,7 +93245,6 @@ function isCacheFeatureAvailable() {
|
|
|
|
|
core.warning('The runner was not able to contact the cache service. Caching will be skipped');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
@@ -93218,13 +93290,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
|
|
}) : function(o, v) {
|
|
|
|
|
o["default"] = v;
|
|
|
|
|
});
|
|
|
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
var __importStar = (this && this.__importStar) || (function () {
|
|
|
|
|
var ownKeys = function(o) {
|
|
|
|
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
|
|
|
var ar = [];
|
|
|
|
|
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
|
|
|
return ar;
|
|
|
|
|
};
|
|
|
|
|
return ownKeys(o);
|
|
|
|
|
};
|
|
|
|
|
return function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
})();
|
|
|
|
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
|
|
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
|
|
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
|
|
|
@@ -93238,7 +93320,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
|
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
|
|
|
};
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
exports.resolveStableVersionInput = exports.parseGoVersionFile = exports.makeSemver = exports.getVersionsDist = exports.findMatch = exports.getInfoFromManifest = exports.getManifest = exports.extractGoArchive = exports.getGo = void 0;
|
|
|
|
|
exports.getGo = getGo;
|
|
|
|
|
exports.extractGoArchive = extractGoArchive;
|
|
|
|
|
exports.getManifest = getManifest;
|
|
|
|
|
exports.getInfoFromManifest = getInfoFromManifest;
|
|
|
|
|
exports.findMatch = findMatch;
|
|
|
|
|
exports.getVersionsDist = getVersionsDist;
|
|
|
|
|
exports.makeSemver = makeSemver;
|
|
|
|
|
exports.parseGoVersionFile = parseGoVersionFile;
|
|
|
|
|
exports.resolveStableVersionInput = resolveStableVersionInput;
|
|
|
|
|
const tc = __importStar(__nccwpck_require__(7784));
|
|
|
|
|
const core = __importStar(__nccwpck_require__(2186));
|
|
|
|
|
const path = __importStar(__nccwpck_require__(1017));
|
|
|
|
|
@@ -93333,7 +93423,6 @@ function getGo(versionSpec_1, checkLatest_1, auth_1) {
|
|
|
|
|
return downloadPath;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
exports.getGo = getGo;
|
|
|
|
|
function resolveVersionFromManifest(versionSpec, stable, auth, arch, manifest) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
try {
|
|
|
|
|
@@ -93422,7 +93511,6 @@ function extractGoArchive(archivePath) {
|
|
|
|
|
return extPath;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
exports.extractGoArchive = extractGoArchive;
|
|
|
|
|
function getManifest(auth) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
try {
|
|
|
|
|
@@ -93437,7 +93525,6 @@ function getManifest(auth) {
|
|
|
|
|
return yield getManifestFromURL();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
exports.getManifest = getManifest;
|
|
|
|
|
function getManifestFromRepo(auth) {
|
|
|
|
|
core.debug(`Getting manifest from ${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}@${MANIFEST_REPO_BRANCH}`);
|
|
|
|
|
return tc.getManifestFromRepo(MANIFEST_REPO_OWNER, MANIFEST_REPO_NAME, auth, MANIFEST_REPO_BRANCH);
|
|
|
|
|
@@ -93472,7 +93559,6 @@ function getInfoFromManifest(versionSpec_1, stable_1, auth_1) {
|
|
|
|
|
return info;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
exports.getInfoFromManifest = getInfoFromManifest;
|
|
|
|
|
function getInfoFromDist(versionSpec, arch) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
const version = yield findMatch(versionSpec, arch);
|
|
|
|
|
@@ -93524,7 +93610,6 @@ function findMatch(versionSpec_1) {
|
|
|
|
|
return result;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
exports.findMatch = findMatch;
|
|
|
|
|
function getVersionsDist(dlUrl) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
// this returns versions descending so latest is first
|
|
|
|
|
@@ -93535,7 +93620,6 @@ function getVersionsDist(dlUrl) {
|
|
|
|
|
return (yield http.getJson(dlUrl)).result;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
exports.getVersionsDist = getVersionsDist;
|
|
|
|
|
//
|
|
|
|
|
// Convert the go version syntax into semver for semver matching
|
|
|
|
|
// 1.13.1 => 1.13.1
|
|
|
|
|
@@ -93560,7 +93644,6 @@ function makeSemver(version) {
|
|
|
|
|
}
|
|
|
|
|
return fullVersion;
|
|
|
|
|
}
|
|
|
|
|
exports.makeSemver = makeSemver;
|
|
|
|
|
function parseGoVersionFile(versionFilePath) {
|
|
|
|
|
const contents = fs_1.default.readFileSync(versionFilePath).toString();
|
|
|
|
|
if (path.basename(versionFilePath) === 'go.mod' ||
|
|
|
|
|
@@ -93570,7 +93653,6 @@ function parseGoVersionFile(versionFilePath) {
|
|
|
|
|
}
|
|
|
|
|
return contents.trim();
|
|
|
|
|
}
|
|
|
|
|
exports.parseGoVersionFile = parseGoVersionFile;
|
|
|
|
|
function resolveStableVersionDist(versionSpec, arch) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
const archFilter = sys.getArch(arch);
|
|
|
|
|
@@ -93609,7 +93691,6 @@ function resolveStableVersionInput(versionSpec, arch, platform, manifest) {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
exports.resolveStableVersionInput = resolveStableVersionInput;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
@@ -93635,13 +93716,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
|
|
}) : function(o, v) {
|
|
|
|
|
o["default"] = v;
|
|
|
|
|
});
|
|
|
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
var __importStar = (this && this.__importStar) || (function () {
|
|
|
|
|
var ownKeys = function(o) {
|
|
|
|
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
|
|
|
var ar = [];
|
|
|
|
|
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
|
|
|
return ar;
|
|
|
|
|
};
|
|
|
|
|
return ownKeys(o);
|
|
|
|
|
};
|
|
|
|
|
return function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
})();
|
|
|
|
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
|
|
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
|
|
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
|
|
|
@@ -93655,7 +93746,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
|
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
|
|
|
};
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
exports.parseGoVersion = exports.addBinToPath = exports.run = void 0;
|
|
|
|
|
exports.run = run;
|
|
|
|
|
exports.addBinToPath = addBinToPath;
|
|
|
|
|
exports.parseGoVersion = parseGoVersion;
|
|
|
|
|
const core = __importStar(__nccwpck_require__(2186));
|
|
|
|
|
const io = __importStar(__nccwpck_require__(7436));
|
|
|
|
|
const installer = __importStar(__nccwpck_require__(2574));
|
|
|
|
|
@@ -93729,7 +93822,6 @@ function run() {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
exports.run = run;
|
|
|
|
|
function addBinToPath() {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
let added = false;
|
|
|
|
|
@@ -93759,7 +93851,6 @@ function addBinToPath() {
|
|
|
|
|
return added;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
exports.addBinToPath = addBinToPath;
|
|
|
|
|
function parseGoVersion(versionString) {
|
|
|
|
|
// get the installed version as an Action output
|
|
|
|
|
// based on go/src/cmd/go/internal/version/version.go:
|
|
|
|
|
@@ -93767,7 +93858,6 @@ function parseGoVersion(versionString) {
|
|
|
|
|
// expecting go<version> for runtime.Version()
|
|
|
|
|
return versionString.split(' ')[2].slice('go'.length);
|
|
|
|
|
}
|
|
|
|
|
exports.parseGoVersion = parseGoVersion;
|
|
|
|
|
function resolveVersionInput() {
|
|
|
|
|
let version = core.getInput('go-version');
|
|
|
|
|
const versionFilePath = core.getInput('go-version-file');
|
|
|
|
|
@@ -93815,7 +93905,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
|
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
|
|
|
};
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
exports.getArch = exports.getPlatform = void 0;
|
|
|
|
|
exports.getPlatform = getPlatform;
|
|
|
|
|
exports.getArch = getArch;
|
|
|
|
|
const os_1 = __importDefault(__nccwpck_require__(2037));
|
|
|
|
|
function getPlatform() {
|
|
|
|
|
// darwin and linux match already
|
|
|
|
|
@@ -93828,7 +93919,6 @@ function getPlatform() {
|
|
|
|
|
}
|
|
|
|
|
return plat;
|
|
|
|
|
}
|
|
|
|
|
exports.getPlatform = getPlatform;
|
|
|
|
|
function getArch(arch) {
|
|
|
|
|
// 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 's390', 's390x', 'x32', and 'x64'.
|
|
|
|
|
// wants amd64, 386, arm64, armv61, ppc641e, s390x
|
|
|
|
|
@@ -93849,7 +93939,6 @@ function getArch(arch) {
|
|
|
|
|
}
|
|
|
|
|
return arch;
|
|
|
|
|
}
|
|
|
|
|
exports.getArch = getArch;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|