mirror of
https://github.com/joaquinjsb/gitea-release-please-action
synced 2026-05-13 05:41:39 +02:00
committed by
GitHub
parent
c32b6ccd03
commit
ec4b106173
60
dist/index.js
vendored
60
dist/index.js
vendored
@@ -79497,6 +79497,7 @@ function toConventionalChangelogFormat(ast) {
|
|||||||
text: '', // "text" will be populated if a BREAKING CHANGE token is parsed.
|
text: '', // "text" will be populated if a BREAKING CHANGE token is parsed.
|
||||||
};
|
};
|
||||||
visitWithAncestors(ast, ['breaking-change'], (node, ancestors) => {
|
visitWithAncestors(ast, ['breaking-change'], (node, ancestors) => {
|
||||||
|
let hitBreakingMarker = false;
|
||||||
let parent = ancestors.pop();
|
let parent = ancestors.pop();
|
||||||
if (!parent) {
|
if (!parent) {
|
||||||
return;
|
return;
|
||||||
@@ -79509,7 +79510,13 @@ function toConventionalChangelogFormat(ast) {
|
|||||||
breaking.text = '';
|
breaking.text = '';
|
||||||
// We treat text from the BREAKING CHANGE marker forward as
|
// We treat text from the BREAKING CHANGE marker forward as
|
||||||
// the breaking change notes:
|
// 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;
|
breaking.text += node.value;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@@ -83794,11 +83801,17 @@ class BaseStrategy {
|
|||||||
releaseData = pullRequestBody.releaseData[0];
|
releaseData = pullRequestBody.releaseData[0];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// manifest release with multiple components
|
// manifest release with multiple components - find the release notes
|
||||||
releaseData = pullRequestBody.releaseData.find(releaseData => {
|
// for the component to see if it was included in this release (parsed
|
||||||
return (this.normalizeComponent(releaseData.component) ===
|
// from the release pull request body)
|
||||||
|
releaseData = pullRequestBody.releaseData.find(datum => {
|
||||||
|
return (this.normalizeComponent(datum.component) ===
|
||||||
this.normalizeComponent(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;
|
const notes = releaseData === null || releaseData === void 0 ? void 0 : releaseData.notes;
|
||||||
if (notes === undefined) {
|
if (notes === undefined) {
|
||||||
@@ -85491,20 +85504,16 @@ class Python extends base_1.BaseStrategy {
|
|||||||
logger_1.logger.warn('No project/component found.');
|
logger_1.logger.warn('No project/component found.');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
updates.push({
|
[projectName, projectName.replace(/-/g, '_')]
|
||||||
path: this.addPath(`${projectName}/__init__.py`),
|
.flatMap(packageName => [
|
||||||
|
`${packageName}/__init__.py`,
|
||||||
|
`src/${packageName}/__init__.py`,
|
||||||
|
])
|
||||||
|
.forEach(packagePath => updates.push({
|
||||||
|
path: this.addPath(packagePath),
|
||||||
createIfMissing: false,
|
createIfMissing: false,
|
||||||
updater: new python_file_with_version_1.PythonFileWithVersion({
|
updater: new python_file_with_version_1.PythonFileWithVersion({ version }),
|
||||||
version,
|
}));
|
||||||
}),
|
|
||||||
});
|
|
||||||
updates.push({
|
|
||||||
path: this.addPath(`src/${projectName}/__init__.py`),
|
|
||||||
createIfMissing: false,
|
|
||||||
updater: new python_file_with_version_1.PythonFileWithVersion({
|
|
||||||
version,
|
|
||||||
}),
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
// There should be only one version.py, but foreach in case that is incorrect
|
// 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);
|
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
|
* @returns {string} The updated content
|
||||||
*/
|
*/
|
||||||
updateContent(content) {
|
updateContent(content) {
|
||||||
const oldVersion = content.match(/version: ([0-9.]+)\+?([0-9]*$)/);
|
const oldVersion = content.match(/^version: ([0-9.]+)\+?(.*$)/m);
|
||||||
let buildNumber = '';
|
let buildNumber = '';
|
||||||
if (oldVersion) {
|
if (oldVersion) {
|
||||||
buildNumber = `${oldVersion[2]}`;
|
buildNumber = oldVersion[2];
|
||||||
if (buildNumber.length > 0) {
|
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}`;
|
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 {
|
else {
|
||||||
logger_1.logger.info(`updating from ${oldVersion[1]} to ${this.version}`);
|
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;
|
exports.PubspecYaml = PubspecYaml;
|
||||||
@@ -114295,7 +114309,7 @@ module.exports = {};
|
|||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
module.exports = {"i8":"13.19.3"};
|
module.exports = {"i8":"13.19.6"};
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user