mirror of
https://github.com/joaquinjsb/gitea-release-please-action
synced 2026-05-14 03:41:35 +02:00
chore: build dist release-please-action (#493)
This commit is contained in:
committed by
GitHub
parent
c4ff696679
commit
a13d38996a
21
dist/index.js
vendored
21
dist/index.js
vendored
@@ -81024,7 +81024,7 @@ class Manifest {
|
|||||||
});
|
});
|
||||||
const component = await strategy.getBranchComponent();
|
const component = await strategy.getBranchComponent();
|
||||||
const releasedVersions = {};
|
const releasedVersions = {};
|
||||||
const latestVersion = await latestReleaseVersion(github, targetBranch, version => isPublishedVersion(strategy, version), component, config.pullRequestTitlePattern);
|
const latestVersion = await latestReleaseVersion(github, targetBranch, version => isPublishedVersion(strategy, version), config, component);
|
||||||
if (latestVersion) {
|
if (latestVersion) {
|
||||||
releasedVersions[path] = latestVersion;
|
releasedVersions[path] = latestVersion;
|
||||||
}
|
}
|
||||||
@@ -81717,7 +81717,7 @@ function isPublishedVersion(strategy, version) {
|
|||||||
* @param {string} prefix Limit the release to a specific component.
|
* @param {string} prefix Limit the release to a specific component.
|
||||||
* @param pullRequestTitlePattern Configured PR title pattern.
|
* @param pullRequestTitlePattern Configured PR title pattern.
|
||||||
*/
|
*/
|
||||||
async function latestReleaseVersion(github, targetBranch, releaseFilter, prefix, pullRequestTitlePattern) {
|
async function latestReleaseVersion(github, targetBranch, releaseFilter, config, prefix) {
|
||||||
const branchPrefix = prefix
|
const branchPrefix = prefix
|
||||||
? prefix.endsWith('-')
|
? prefix.endsWith('-')
|
||||||
? prefix.replace(/-$/, '')
|
? prefix.replace(/-$/, '')
|
||||||
@@ -81747,7 +81747,7 @@ async function latestReleaseVersion(github, targetBranch, releaseFilter, prefix,
|
|||||||
if (branchName.getComponent() !== branchPrefix) {
|
if (branchName.getComponent() !== branchPrefix) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const pullRequestTitle = pull_request_title_1.PullRequestTitle.parse(mergedPullRequest.title, pullRequestTitlePattern);
|
const pullRequestTitle = pull_request_title_1.PullRequestTitle.parse(mergedPullRequest.title, config.pullRequestTitlePattern);
|
||||||
if (!pullRequestTitle) {
|
if (!pullRequestTitle) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -81766,7 +81766,7 @@ async function latestReleaseVersion(github, targetBranch, releaseFilter, prefix,
|
|||||||
if (!tagName) {
|
if (!tagName) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (tagName.component === branchPrefix) {
|
if (tagMatchesConfig(tagName, branchPrefix, config.includeComponentInTag)) {
|
||||||
logger_1.logger.debug(`found release for ${prefix}`, tagName.version);
|
logger_1.logger.debug(`found release for ${prefix}`, tagName.version);
|
||||||
if (!commitShas.has(release.sha)) {
|
if (!commitShas.has(release.sha)) {
|
||||||
logger_1.logger.debug(`SHA not found in recent commits to branch ${targetBranch}, skipping`);
|
logger_1.logger.debug(`SHA not found in recent commits to branch ${targetBranch}, skipping`);
|
||||||
@@ -81789,7 +81789,7 @@ async function latestReleaseVersion(github, targetBranch, releaseFilter, prefix,
|
|||||||
if (!tagName) {
|
if (!tagName) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (tagName.component === branchPrefix) {
|
if (tagMatchesConfig(tagName, branchPrefix, config.includeComponentInTag)) {
|
||||||
if (!commitShas.has(tag.sha)) {
|
if (!commitShas.has(tag.sha)) {
|
||||||
logger_1.logger.debug(`SHA not found in recent commits to branch ${targetBranch}, skipping`);
|
logger_1.logger.debug(`SHA not found in recent commits to branch ${targetBranch}, skipping`);
|
||||||
continue;
|
continue;
|
||||||
@@ -81849,6 +81849,15 @@ function commitsAfterSha(commits, lastReleaseSha) {
|
|||||||
}
|
}
|
||||||
return commits.slice(0, index);
|
return commits.slice(0, index);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Returns true if the release tag matches the configured component. Returns
|
||||||
|
* true if `includeComponentInTag` is false and there is no component in the
|
||||||
|
* tag, OR if the tag's component matches the release component.
|
||||||
|
*/
|
||||||
|
function tagMatchesConfig(tag, branchComponent, includeComponentInTag) {
|
||||||
|
return ((includeComponentInTag && tag.component === branchComponent) ||
|
||||||
|
(!includeComponentInTag && !tag.component));
|
||||||
|
}
|
||||||
//# sourceMappingURL=manifest.js.map
|
//# sourceMappingURL=manifest.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -113574,7 +113583,7 @@ module.exports = {};
|
|||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
module.exports = {"i8":"13.16.4"};
|
module.exports = {"i8":"13.16.5"};
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user