1
0
mirror of https://github.com/joaquinjsb/gitea-release-please-action synced 2026-05-09 01:11:13 +02:00

chore: build dist (#538)

chore: build dist release-please-action
This commit is contained in:
Google GitHub Actions Bot
2022-07-27 16:45:42 -05:00
committed by GitHub
parent c32b6ccd03
commit ec4b106173

60
dist/index.js vendored
View File

@@ -79497,6 +79497,7 @@ function toConventionalChangelogFormat(ast) {
text: '', // "text" will be populated if a BREAKING CHANGE token is parsed.
};
visitWithAncestors(ast, ['breaking-change'], (node, ancestors) => {
let hitBreakingMarker = false;
let parent = ancestors.pop();
if (!parent) {
return;
@@ -79509,7 +79510,13 @@ function toConventionalChangelogFormat(ast) {
breaking.text = '';
// We treat text from the BREAKING CHANGE marker forward as
// the breaking change notes:
visit(parent, ['text', 'newline'], (node) => {
visit(parent, ['breaking-change', 'text', 'newline'], (node) => {
if (node.type === 'breaking-change') {
hitBreakingMarker = true;
return;
}
if (!hitBreakingMarker)
return;
breaking.text += node.value;
});
break;
@@ -83794,11 +83801,17 @@ class BaseStrategy {
releaseData = pullRequestBody.releaseData[0];
}
else {
// manifest release with multiple components
releaseData = pullRequestBody.releaseData.find(releaseData => {
return (this.normalizeComponent(releaseData.component) ===
// manifest release with multiple components - find the release notes
// for the component to see if it was included in this release (parsed
// from the release pull request body)
releaseData = pullRequestBody.releaseData.find(datum => {
return (this.normalizeComponent(datum.component) ===
this.normalizeComponent(component));
});
if (!releaseData && pullRequestBody.releaseData.length > 0) {
logger_1.logger.info(`Pull request contains releases, but not for component: ${component}`);
return;
}
}
const notes = releaseData === null || releaseData === void 0 ? void 0 : releaseData.notes;
if (notes === undefined) {
@@ -85491,20 +85504,16 @@ class Python extends base_1.BaseStrategy {
logger_1.logger.warn('No project/component found.');
}
else {
updates.push({
path: this.addPath(`${projectName}/__init__.py`),
[projectName, projectName.replace(/-/g, '_')]
.flatMap(packageName => [
`${packageName}/__init__.py`,
`src/${packageName}/__init__.py`,
])
.forEach(packagePath => updates.push({
path: this.addPath(packagePath),
createIfMissing: false,
updater: new python_file_with_version_1.PythonFileWithVersion({
version,
}),
});
updates.push({
path: this.addPath(`src/${projectName}/__init__.py`),
createIfMissing: false,
updater: new python_file_with_version_1.PythonFileWithVersion({
version,
}),
});
updater: new python_file_with_version_1.PythonFileWithVersion({ version }),
}));
}
// There should be only one version.py, but foreach in case that is incorrect
const versionPyFilesSearch = this.github.findFilesByFilenameAndRef('version.py', this.targetBranch, this.path);
@@ -86204,19 +86213,24 @@ class PubspecYaml extends default_1.DefaultUpdater {
* @returns {string} The updated content
*/
updateContent(content) {
const oldVersion = content.match(/version: ([0-9.]+)\+?([0-9]*$)/);
const oldVersion = content.match(/^version: ([0-9.]+)\+?(.*$)/m);
let buildNumber = '';
if (oldVersion) {
buildNumber = `${oldVersion[2]}`;
if (buildNumber.length > 0) {
buildNumber = oldVersion[2];
const parsedBuild = parseInt(buildNumber);
if (!isNaN(parsedBuild)) {
buildNumber = `+${parsedBuild + 1}`;
logger_1.logger.info(`updating from ${oldVersion[1]}+${oldVersion[2]} to ${this.version}${buildNumber}`);
}
else if (buildNumber.length > 0) {
buildNumber = `+${buildNumber}`;
logger_1.logger.info(`updating from ${oldVersion[1]}${buildNumber} to ${this.version}${buildNumber}`);
logger_1.logger.info(`updating from ${oldVersion[1]}+${oldVersion[2]} to ${this.version}${buildNumber}`);
}
else {
logger_1.logger.info(`updating from ${oldVersion[1]} to ${this.version}`);
}
}
return content.replace(/version: ([0-9.]+)\+?([0-9]*$)/, `version: ${this.version}${buildNumber}`);
return content.replace(/^version: .*$/m, `version: ${this.version}${buildNumber}`);
}
}
exports.PubspecYaml = PubspecYaml;
@@ -114295,7 +114309,7 @@ module.exports = {};
/***/ ((module) => {
"use strict";
module.exports = {"i8":"13.19.3"};
module.exports = {"i8":"13.19.6"};
/***/ }),