diff --git a/bin/release.js b/bin/release.js index f411b3d..93b3db5 100755 --- a/bin/release.js +++ b/bin/release.js @@ -2,11 +2,21 @@ // Packages const asyncToGen = require('async-to-gen/register') +const updateNotifier = require('update-notifier') + +// Ours +const pkg = require('../package') // Support for keywords "async" and "await" asyncToGen({ excludes: null }) +// Let user know if there's an update +// This isn't important when deployed to Now +if (!process.env.NOW) { + updateNotifier({pkg}).notify() +} + // Load package core with async/await support require('../lib') diff --git a/lib/index.js b/lib/index.js index f7098e2..f3d1cea 100644 --- a/lib/index.js +++ b/lib/index.js @@ -5,7 +5,6 @@ const semVer = require('semver') const inquirer = require('inquirer') const open = require('open') const taggedVersions = require('tagged-versions') -const updateNotifier = require('update-notifier') // Ours const groupChanges = require('../lib/group') @@ -16,7 +15,6 @@ const definitions = require('../lib/definitions') const connect = require('../lib/connect') const createChangelog = require('../lib/changelog') const handleSpinner = require('../lib/spinner') -const pkg = require('../package') args .option('pre', 'Mark the release as prerelease') @@ -45,9 +43,6 @@ const changeTypes = [ } ] -// Let people know when there's an update -updateNotifier({pkg}).notify() - const getReleaseURL = (release, edit = false) => { if (!release || !release.html_url) { return false