Skip to content

Commit

Permalink
fix: ignore version tags
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Apr 7, 2018
1 parent 05b0b1d commit ba9b417
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/init/check_update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const hook: Hook<'init'> = async function ({config}) {
const checkVersion = async () => {
try {
const distTags = await fs.readJSON(file)
if (distTags && distTags.latest && semver.gt(distTags.latest, config.version)) {
if (distTags && distTags.latest && semver.gt(distTags.latest.split('-')[0], config.version.split('-')[0])) {
const chalk: typeof Chalk = require('chalk')
this.warn(`${config.name} update available from ${chalk.greenBright(config.version)} to ${chalk.greenBright(distTags.latest)}`)
}
Expand Down

0 comments on commit ba9b417

Please sign in to comment.