+++ /dev/null
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const tslib_1 = require("tslib");
-const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
-const releaseFilter = /^v\d+\.\d+\.\d+$/;
-async function checkLatestTag(repo, prefixFilter) {
- const resp = await node_fetch_1.default(`https://api.github.com/repos/${repo}/tags`);
- const data = await resp.json();
- let tags = data.map(t => t.name);
- if (prefixFilter) {
- tags = tags
- .filter(t => t.match(prefixFilter))
- .map(t => t.replace(prefixFilter, ''));
- }
- tags = tags
- .filter(t => t.match(releaseFilter));
- return tags.length > 0
- ? tags[0].replace(/^v/, '')
- : '';
-}
-exports.default = checkLatestTag;
-//# sourceMappingURL=checktag.js.map
\ No newline at end of file