diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..3180e34 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,17 @@ +# [2.5.2] - 2021-5-18 [PR: #41](https://github.com/dolittle/establish-context-action/pull/41) +## Summary + +The main purpose of this PR was to fix an issue we were having when we were releasing fixes while working on a new prerelease in a branch. So for example say we were working on `5.6.0-embeddings` while the latest release was on `5.5.2`. When we merged in a _patch_ to master, the expected new version should be `5.5.3`, but was `5.6.0`. + +Factored out the fetching of versions from `CurrentVersionFinder` so that we can write some specs for it, wrote specs, and fixed the implementation. Also cleaned up some documentation to make it all the same (a few different styles floating around), and removed some unused code. + +### Added + +- `IVersionFetcher` and implementation `GitHubTagsVersionFetcher` using existing code. +- Specifications for `CurrentVersionFinder` + +### Fixed + +- `CurrentVersionFinder` so that it disregards running prereleases when pulling in a normal release. Also found some other potential small issues that we have not encountered. + + diff --git a/release/index.js b/release/index.js index acc9c68..f99aae8 100644 --- a/release/index.js +++ b/release/index.js @@ -375,7 +375,7 @@ function run() { return __awaiter(this, void 0, void 0, function* () { try { const token = core_1.getInput('token', { required: true }); - const prereleaseBranches = (_b = (_a = core_1.getInput('prerelease-branches', { required: false })) === null || _a === void 0 ? void 0 : _a.split(',')) !== null && _b !== void 0 ? _b : []; + const prereleaseBranches = (_b = (_a = core_1.getInput('prerelease-branches', { required: false })) === null || _a === void 0 ? void 0 : _a.split(',').map(_ => _.trim())) !== null && _b !== void 0 ? _b : []; const currentVersion = (_c = core_1.getInput('current-version', { required: false })) !== null && _c !== void 0 ? _c : ''; const versionFile = (_d = core_1.getInput('version-file', { required: false })) !== null && _d !== void 0 ? _d : ''; const environmentBranch = core_1.getInput('environment-branch', { required: false }); @@ -443,7 +443,7 @@ function fail(error) { core_1.setFailed(error.message); } -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNvdXJjZS9hY3Rpb24udHMiXSwibmFtZXMiOltdLCJt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