Skip to content

Commit

Permalink
fix(roc-plugin-repo): Create annotated tags in Git
Browse files Browse the repository at this point in the history
This makes it possible for us to correctly fetch them from the GitHub API.
  • Loading branch information
dlmr committed Sep 8, 2017
1 parent 81e1bf7 commit 663d1d3
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions extensions/roc-plugin-repo/src/commands/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ export default projects => ({
project.tag = `${project.name}@${status[project.name]
.newVersion}`;
return execa.shell(
`git tag ${project.tag} ${project.releaseCommitHash}`,
`git tag ${project.tag} ${project.releaseCommitHash} -a -m ${project.tag}`,
{
cwd: context.directory,
},
Expand All @@ -416,9 +416,12 @@ export default projects => ({
if (collectedRelease) {
const releaseTag = await getTag(collectedRelease);
ctx.releaseTag = releaseTag;
return execa.shell(`git tag ${releaseTag}`, {
cwd: context.directory,
});
return execa.shell(
`git tag ${releaseTag} -a -m ${releaseTag}`,
{
cwd: context.directory,
},
);
}

return Promise.resolve();
Expand All @@ -427,9 +430,12 @@ export default projects => ({

ctx.releaseTag = `v${status[selectedToBeReleased[0].name]
.newVersion}`;
return execa.shell(`git tag ${ctx.releaseTag}`, {
cwd: context.directory,
});
return execa.shell(
`git tag ${ctx.releaseTag} -a -m ${ctx.releaseTag}`,
{
cwd: context.directory,
},
);
},
},
]),
Expand Down Expand Up @@ -493,10 +499,10 @@ export default projects => ({
title: 'Creating GitHub release',
skip: () =>
!token || !git || !tag || !github || !push || !hasRepositoryLink,
task: async ctx => {
task: ctx => {
if (individual && isMonorepo) {
return Promise.all(
selectedToBeReleased.map(async project =>
selectedToBeReleased.map(project =>
createGitHubRelease(
context.packageJSON,
project.releaseText,
Expand Down

0 comments on commit 663d1d3

Please sign in to comment.