Add correct tag to release on publish (#828).

This commit is contained in:
Richard Moore 2020-05-13 03:54:38 -04:00
parent 2a78953f9a
commit 85160766cd
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651
1 changed files with 5 additions and 2 deletions

View File

@ -2,8 +2,9 @@
const config = require("../config"); const config = require("../config");
const { latestChange } = require("../changelog"); const { ChangelogPath, latestChange } = require("../changelog");
const { getOrdered, loadPackage } = require("../depgraph"); const { getOrdered, loadPackage } = require("../depgraph");
const { getGitTag } = require("../git");
const { createRelease } = require("../github"); const { createRelease } = require("../github");
const { getPackageVersion, publish } = require("../npm"); const { getPackageVersion, publish } = require("../npm");
const { log } = require("../log"); const { log } = require("../log");
@ -35,6 +36,8 @@ if (process.argv.length > 2) {
(async function() { (async function() {
let token = null; let token = null;
const gitCommit = await getGitTag(ChangelogPath);
let includeEthers = false; let includeEthers = false;
// @TODO: Fail if there are any untracked files or unchecked in files // @TODO: Fail if there are any untracked files or unchecked in files
@ -107,7 +110,7 @@ if (process.argv.length > 2) {
const change = latestChange(); const change = latestChange();
// Publish the release // 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(`<bold:Published Release:> ${ link }`); log(`<bold:Published Release:> ${ link }`);
} }