11/**
2- * universal-version-bump v0.9.0
2+ * universal-version-bump v0.9.1
33 * Universal Version Bump
44 *
55 * Description: A GitHub Action to automatically bump versions across any app (Node, Python, PHP, Docker, etc.)
6677 * Homepage: https://github.com/taj54/universal-version-bump#readme
88 * License: MIT
9- * Generated on Mon, 25 Aug 2025 10:58:18 GMT
9+ * Generated on Tue, 26 Aug 2025 08:40:56 GMT
1010 */
1111require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap
1212/******/ var __webpack_modules__ = ({
@@ -32756,6 +32756,7 @@ var __importStar = (this && this.__importStar) || (function () {
3275632756})();
3275732757Object.defineProperty(exports, "__esModule", ({ value: true }));
3275832758const services_1 = __nccwpck_require__(5234);
32759+ const utils_1 = __nccwpck_require__(9499);
3275932760const updaters_1 = __nccwpck_require__(1384);
3276032761const registry_1 = __nccwpck_require__(8378);
3276132762const errors_1 = __nccwpck_require__(4830);
@@ -32775,10 +32776,17 @@ async function run() {
3277532776 updaterRegistry.registerUpdater(new updaters_1.PHPUpdater());
3277632777 const updaterService = new services_1.UpdaterService(updaterRegistry);
3277732778 const gitService = new services_1.GitService();
32779+ const fileHandler = new utils_1.FileHandler();
32780+ const changelogService = new services_1.ChangelogService(fileHandler);
3277832781 const platform = updaterService.getPlatform(targetPlatform);
3277932782 core.info(`Detected platform: ${platform}`);
3278032783 const version = updaterService.updateVersion(platform, releaseType);
3278132784 core.setOutput('new_version', version);
32785+ // Generate and update changelog
32786+ const latestTag = await changelogService.getLatestTag();
32787+ const commits = await changelogService.getCommitsSinceTag(latestTag);
32788+ const changelogContent = changelogService.generateChangelog(commits, version);
32789+ await changelogService.updateChangelog(changelogContent);
3278232790 // Git Commit & Tag
3278332791 const gitTag = config_1.GIT_TAG;
3278432792 await gitService.configureGitUser();
@@ -32867,6 +32875,111 @@ class UpdaterRegistry {
3286732875exports.UpdaterRegistry = UpdaterRegistry;
3286832876
3286932877
32878+ /***/ }),
32879+
32880+ /***/ 5417:
32881+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
32882+
32883+ "use strict";
32884+
32885+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
32886+ if (k2 === undefined) k2 = k;
32887+ var desc = Object.getOwnPropertyDescriptor(m, k);
32888+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
32889+ desc = { enumerable: true, get: function() { return m[k]; } };
32890+ }
32891+ Object.defineProperty(o, k2, desc);
32892+ }) : (function(o, m, k, k2) {
32893+ if (k2 === undefined) k2 = k;
32894+ o[k2] = m[k];
32895+ }));
32896+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
32897+ Object.defineProperty(o, "default", { enumerable: true, value: v });
32898+ }) : function(o, v) {
32899+ o["default"] = v;
32900+ });
32901+ var __importStar = (this && this.__importStar) || (function () {
32902+ var ownKeys = function(o) {
32903+ ownKeys = Object.getOwnPropertyNames || function (o) {
32904+ var ar = [];
32905+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
32906+ return ar;
32907+ };
32908+ return ownKeys(o);
32909+ };
32910+ return function (mod) {
32911+ if (mod && mod.__esModule) return mod;
32912+ var result = {};
32913+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32914+ __setModuleDefault(result, mod);
32915+ return result;
32916+ };
32917+ })();
32918+ Object.defineProperty(exports, "__esModule", ({ value: true }));
32919+ exports.ChangelogService = void 0;
32920+ const exec = __importStar(__nccwpck_require__(8872));
32921+ class ChangelogService {
32922+ constructor(fileHandler) {
32923+ this.fileHandler = fileHandler;
32924+ }
32925+ async getLatestTag() {
32926+ let latestTag = '';
32927+ const options = {
32928+ listeners: {
32929+ stdout: (data) => {
32930+ latestTag += data.toString();
32931+ },
32932+ },
32933+ };
32934+ await exec.exec('git', ['describe', '--tags', '--abbrev=0'], options);
32935+ return latestTag.trim();
32936+ }
32937+ async getCommitsSinceTag(tag) {
32938+ let commits = '';
32939+ const options = {
32940+ listeners: {
32941+ stdout: (data) => {
32942+ commits += data.toString();
32943+ },
32944+ },
32945+ };
32946+ await exec.exec('git', ['log', `${tag}..HEAD`, '--oneline'], options);
32947+ return commits.split('\n').filter(Boolean);
32948+ }
32949+ generateChangelog(commits, newVersion) {
32950+ const changelogDate = new Date().toISOString().split('T')[0];
32951+ let changelogContent = `## v${newVersion} ${changelogDate}\n\n`;
32952+ const categorizedCommits = { Added: [], Changed: [], Fixed: [] };
32953+ for (const commit of commits) {
32954+ const commitMessage = commit.split(' ').slice(1).join(' ');
32955+ if (commitMessage.startsWith('feat') || commitMessage.startsWith('Added')) {
32956+ categorizedCommits.Added.push(`- ${commitMessage}`);
32957+ }
32958+ else if (commitMessage.startsWith('fix') || commitMessage.startsWith('Fixed')) {
32959+ categorizedCommits.Fixed.push(`- ${commitMessage}`);
32960+ }
32961+ else {
32962+ categorizedCommits.Changed.push(`- ${commitMessage}`);
32963+ }
32964+ }
32965+ for (const category in categorizedCommits) {
32966+ if (categorizedCommits[category].length > 0) {
32967+ changelogContent += `### ${category}\n\n`;
32968+ changelogContent += categorizedCommits[category].join('\n') + '\n\n';
32969+ }
32970+ }
32971+ return changelogContent;
32972+ }
32973+ async updateChangelog(changelogContent) {
32974+ const changelogPath = 'CHANGELOG.md';
32975+ const existingChangelog = await this.fileHandler.readFile(changelogPath);
32976+ const newChangelog = changelogContent + existingChangelog;
32977+ await this.fileHandler.writeFile(changelogPath, newChangelog);
32978+ }
32979+ }
32980+ exports.ChangelogService = ChangelogService;
32981+
32982+
3287032983/***/ }),
3287132984
3287232985/***/ 8743:
@@ -32995,6 +33108,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
3299533108Object.defineProperty(exports, "__esModule", ({ value: true }));
3299633109__exportStar(__nccwpck_require__(9104), exports);
3299733110__exportStar(__nccwpck_require__(8743), exports);
33111+ __exportStar(__nccwpck_require__(5417), exports);
3299833112
3299933113
3300033114/***/ }),
@@ -33105,7 +33219,7 @@ class GoUpdater {
3310533219 if (!this.manifestPath)
3310633220 return null;
3310733221 return this.manifestParser.getVersion(this.manifestPath, 'regex', {
33108- regex: /module\s+.*\n.*v (\d+\.\d+\.\d+)/,
33222+ regex: /^ module\s+[^\s]+\s+v? (\d+\.\d+\.\d+)/m ,
3310933223 });
3311033224 }
3311133225 bumpVersion(releaseType) {
0 commit comments