Skip to content

Commit

Permalink
Merge pull request #77 from amitsingh-007/next
Browse files Browse the repository at this point in the history
  • Loading branch information
amitsingh-007 authored Jan 30, 2024
2 parents baa6b01 + 44401ce commit 9dc0f56
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 32 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
"eslint-plugin-prettier": "5.1.3",
"prettier": "3.2.4",
"typescript": "5.3.3",
"vitest": "1.2.1"
"vitest": "1.2.2"
}
}
56 changes: 28 additions & 28 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/services/releaseService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export const getNewReleaseTag = (
throw new Error('Old release tag not found');
}
if (!oldReleaseTag.startsWith(tagPrefix)) {
throw new Error('Old release tag does not start with the tag prefix');
throw new Error(
`Old release tag "${oldReleaseTag}" does not start with the tag prefix "${tagPrefix}"`
);
}
const oldPartsData = parseTemplate(tagTemplate, oldReleaseTag, tagPrefix);
return generateNewTagFromOld(oldPartsData, tagTemplate, tagPrefix);
Expand Down
2 changes: 1 addition & 1 deletion tests/getReleaseTag.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ describe('test invalid cases', () => {
});
it('should throw error when old release doesnt start with prefix', () => {
expect(() => getNewReleaseTag('v', 'yy.mm.i', '20.10.5')).toThrowError(
'Old release tag does not start with the tag prefix'
'Old release tag "20.10.5" does not start with the tag prefix "v"'
);
});
it.each(['yymmi', ...AllowedParts])(
Expand Down

0 comments on commit 9dc0f56

Please sign in to comment.