Skip to content

Commit 755254c

Browse files
committed
feat: Enhance build process with source maps, license generation, and minor doc formatting.
1 parent 5fa924c commit 755254c

6 files changed

Lines changed: 21 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,4 +275,4 @@ All notable changes for each version of the Ambient Music extension.
275275
- CI: Keep the versions up-to-date.
276276
- Updated.
277277
- Build: Update build script.
278-
- Updated readme.
278+
- Updated readme.

DEVELOPER.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ It's recommended to run `pnpm run prepare` before committing, which will lint, f
5050

5151
## Project Structure
5252

53-
- `src/`: Contains the main source code for the action.
54-
- `updaters/`: Contains logic for bumping versions for different platforms (e.g., `nodeUpdater.ts`, `pythonUpdater.ts`).
55-
- `services/`: Contains core services like Git operations and the main updater logic.
56-
- `utils/`: Utility functions.
57-
- `tests/`: Contains unit tests for the source code.
58-
- `dist/`: Compiled JavaScript output.
59-
- `scripts/`: Build scripts.
53+
- `src/`: Contains the main source code for the action.
54+
- `updaters/`: Contains logic for bumping versions for different platforms (e.g., `nodeUpdater.ts`, `pythonUpdater.ts`).
55+
- `services/`: Contains core services like Git operations and the main updater logic.
56+
- `utils/`: Utility functions.
57+
- `tests/`: Contains unit tests for the source code.
58+
- `dist/`: Compiled JavaScript output.
59+
- `scripts/`: Build scripts.
6060

6161
## GitHub Action Inputs
6262

@@ -67,7 +67,7 @@ This action accepts the following inputs:
6767
| `release_type` | Select the version bump type (patch, minor, major) | `true` | `patch` |
6868
| `git_tag` | Whether to create a Git tag after bump | `false` | `true` |
6969
| `target_platform` | Explicitly specify the platform to update (e.g., `node`, `python`). If not provided, the platform will be detected automatically. | `false` | `''` |
70-
| `target_path` | The target path where the version bump should be applied. If not provided, the action will run in the root directory. | `false` | `.` |
70+
| `target_path` | The target path where the version bump should be applied. If not provided, the action will run in the root directory. | `false` | `.` |
7171

7272
## Submitting Changes
7373

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To use this action in your workflow, add the following step:
2727
| `release_type` | Select the version bump type (patch, minor, major) | `patch` |
2828
| `git_tag` | Whether to create a Git tag after bump | `true` |
2929
| `target_platform` | Explicitly specify the platform to update (e.g., `node`, `python`). If not provided, the platform will be detected automatically. | `''` |
30-
| `target_path` | The target path where the version bump should be applied. If not provided, the action will run in the root directory. | `.` |
30+
| `target_path` | The target path where the version bump should be applied. If not provided, the action will run in the root directory. | `.` |
3131

3232
### Explicit Platform Targeting (`target_platform`)
3333

@@ -36,6 +36,7 @@ By default, the action automatically detects the project's platform based on com
3636
The `target_platform` input allows you to specify the exact platform you intend to update. When this input is provided, the action will bypass its automatic detection and directly attempt to update the version for the specified platform.
3737

3838
Supported platforms include:
39+
3940
- `node` (for Node.js projects using `package.json`)
4041
- `python` (for Python projects using `pyproject.toml` or `setup.py`)
4142
- `docker` (for Docker projects using `Dockerfile`)

dist/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
* Author: Taj <[email protected]>
77
* Homepage: https://github.com/taj54/universal-version-bump#readme
88
* License: MIT
9+
* Generated on Sun, 24 Aug 2025 15:33:00 GMT
910
*/
10-
/******/ (() => { // webpackBootstrap
11+
require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap
1112
/******/ var __webpack_modules__ = ({
1213

1314
/***/ 3191:
@@ -33071,7 +33072,7 @@ class DockerUpdater {
3307133072
throw new Error('Docker version not found');
3307233073
const newVersion = (0, utils_1.calculateNextVersion)(current, releaseType);
3307333074
this.manifestParser.updateVersion(this.manifestPath, newVersion, 'regex', {
33074-
regexReplace: /LABEL version="[^"]+"/,
33075+
regexReplace: /"[^"]+"/,
3307533076
});
3307633077
return newVersion;
3307733078
}
@@ -35497,4 +35498,5 @@ module.exports = parseParams
3549735498
/******/ module.exports = __webpack_exports__;
3549835499
/******/
3549935500
/******/ })()
35500-
;
35501+
;
35502+
//# sourceMappingURL=index.js.map

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "universal-version-bump",
33
"displayName": "Universal Version Bump",
4-
"version": "0.8.2",
4+
"version": "0.8.3",
55
"description": "A GitHub Action to automatically bump versions across any app (Node, Python, PHP, Docker, etc.)",
66
"main": "dist/index.js",
77
"scripts": {

scripts/build.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ const banner = `/**
1313
* Author: ${pkg.author.name || 'Unknown'} <${pkg.author.email || 'Unknown'}>
1414
* Homepage: ${pkg.homepage || 'Unknown'}
1515
* License: ${pkg.license || 'MIT'}
16+
* Generated on ${new Date().toUTCString()}
1617
*/\n`;
1718

1819
console.log('Running ncc build...');
1920

20-
execSync('pnpm exec ncc build ./src/index.ts -o dist', { stdio: 'inherit' });
21+
execSync('pnpm exec ncc build ./src/index.ts -o dist --source-map --license licenses.txt', {
22+
stdio: 'inherit',
23+
});
2124

2225
// Prepend banner
2326
const outFile = path.join('dist', 'index.js');

0 commit comments

Comments
 (0)