From 85160766cdcd031f226382901ebadee9d7f40200 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Wed, 13 May 2020 03:54:38 -0400 Subject: [PATCH] Add correct tag to release on publish (#828). --- admin/cmds/publish.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/admin/cmds/publish.js b/admin/cmds/publish.js index 0d8eabd61b..0ef731b67b 100644 --- a/admin/cmds/publish.js +++ b/admin/cmds/publish.js @@ -2,8 +2,9 @@ const config = require("../config"); -const { latestChange } = require("../changelog"); +const { ChangelogPath, latestChange } = require("../changelog"); const { getOrdered, loadPackage } = require("../depgraph"); +const { getGitTag } = require("../git"); const { createRelease } = require("../github"); const { getPackageVersion, publish } = require("../npm"); const { log } = require("../log"); @@ -35,6 +36,8 @@ if (process.argv.length > 2) { (async function() { let token = null; + const gitCommit = await getGitTag(ChangelogPath); + let includeEthers = false; // @TODO: Fail if there are any untracked files or unchecked in files @@ -107,7 +110,7 @@ if (process.argv.length > 2) { const change = latestChange(); // Publish the release - const link = await createRelease(username, password, change.version, change.title, change.content, beta); + const link = await createRelease(username, password, change.version, change.title, change.content, beta, gitCommit); log(` ${ link }`); }