Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tags): write an annotated git tag #989

Merged
merged 1 commit into from Jan 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -11,7 +11,7 @@ describe('createGitTag', () => {
});
expect(run).toHaveBeenCalledTimes(1);
expect(run).toHaveBeenCalledWith({
command: 'git tag v1.2.3',
command: 'git tag -a v1.2.3 -m v1.2.3',
dir: '.',
dryRun: false,
});
Expand All @@ -27,7 +27,8 @@ describe('createGitTag', () => {
});
expect(run).toHaveBeenCalledTimes(1);
expect(run).toHaveBeenCalledWith({
command: 'git tag instantsearch.js@1.2.3 && git tag swag@4',
command:
'git tag -a instantsearch.js@1.2.3 -m instantsearch.js@1.2.3 && git tag -a swag@4 -m swag@4',
dir: '.',
dryRun: false,
});
Expand Down
4 changes: 3 additions & 1 deletion packages/shipjs/src/step/release/createGitTag.js
Expand Up @@ -5,7 +5,9 @@ export default ({ version, config, dir, dryRun }) =>
runStep({ title: 'Creating a git tag.' }, () => {
const { getTagName } = config;
const tagNames = arrayify(getTagName({ version }));
const command = tagNames.map((tag) => `git tag ${tag}`).join(' && ');
const command = tagNames
.map((tag) => `git tag -a ${tag} -m ${tag}`)
dhayab marked this conversation as resolved.
Show resolved Hide resolved
.join(' && ');
run({ command, dir, dryRun });
return { tagNames };
});