Skip to content

Commit 31079ed

Browse files
committed
misc: Added isBump to outputs. Removed patch/prerelease ending in 0 test.
1 parent 4c7a042 commit 31079ed

File tree

7 files changed

+16763
-214
lines changed

7 files changed

+16763
-214
lines changed

__tests__/main.test.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,6 @@ test('should bump final version if tag already exists and ends with 0', () => {
8383
expect(nextVersion).toBe('0.2.1');
8484
});
8585

86-
test('should throw an error if final version is already tagged and does not end with 0', () => {
87-
const nextVersion = () => getNextVersion('0.2.1', ['0.2.1']);
88-
expect(nextVersion).toThrow(Error);
89-
});
90-
91-
test('should throw an error if pre-release version is already tagged and does not end with 0', () => {
92-
const nextVersion = () => getNextVersion('0.2.0-preview.1', ['0.2.0-preview.1']);
93-
expect(nextVersion).toThrow(Error);
94-
});
95-
9686
test('should throw an error for wrong versions', () => {
9787
expect(() => getNextVersion('xyz', [])).toThrow(Error);
9888
expect(() => getNextVersion('1.0', [])).toThrow(Error);

action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ inputs:
77
description: 'Prefix when tagging the release'
88
outputs:
99
version:
10-
description: 'Current version in package.json'
10+
description: 'Version in package.json'
1111
tags:
12-
description: 'Reverse sorted git tags in semver format'
12+
description: 'Git tags in semver format'
1313
nextVersion:
1414
description: 'Computed next version'
1515
nextTag:
1616
description: 'Computed next version with prefix'
17+
isBump:
18+
description: 'If true, the computed next version differs from the version in package.json'
1719
isPrerelease:
1820
description: 'If true, the version is a pre-release'
1921
runs:

dist/index.js

Lines changed: 123 additions & 129 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)