Skip to content

Commit

Permalink
Moved checking for update to main binary
Browse files Browse the repository at this point in the history
  • Loading branch information
leo committed Jan 15, 2017
1 parent 3d4111b commit c87aa9a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 10 additions & 0 deletions bin/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
5 changes: 0 additions & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c87aa9a

Please sign in to comment.