build.js
function getNewVersions() {
  return getTags()
    .then(tags => {
      var newVersions = []
      for(tag of tags) {
        if (semver.gt(tag.name, update.latest) || (
            semver.eq(tag.name, update.latest) && (semver(tag.name).build[0] || 0) > (semver(update.latest).build[0] || 0)
          )) {
          newVersions.push(tag)
        }
      }
      newVersions.reverse()
      // order versions from lower to greater
      console.log(chalk.blue('New versions available: ' + (newVersions.map(v => v.name).join(', ') || 'none') + '.'))
      return newVersions
    })
    .catch(e => console.log(e.stack))
}
function getNewVersions() {
  return getTags()
    .then(tags => {
      var newVersions = []
      for(tag of tags) {
        if (semver.gt(tag.name, update.latest) || (
            semver.eq(tag.name, update.latest) && (semver(tag.name).build[0] || 0) > (semver(update.latest).build[0] || 0)
          )) {
          newVersions.push(tag)
        }
      }
      newVersions.reverse()
      // order versions from lower to greater
      console.log(chalk.blue('New versions available: ' + (newVersions.map(v => v.name).join(', ') || 'none') + '.'))
      return newVersions
    })
    .catch(e => console.log(e.stack))
}
function getNewVersions ( ) { return getTags ( ) . then ( tags => { var newVersions = [ ] for ( tag of tags ) { if ( semver . gt ( tag . name , update . latest ) || ( semver . eq ( tag . name , update . latest ) && ( semver ( tag . name ) . build [ 0 ] || 0 ) > ( semver ( update . latest ) . build [ 0 ] || 0 ) ) ) { newVersions . push ( tag ) } } newVersions . reverse ( ) // order versions from lower to greater console . log ( chalk . blue ( 'New versions available: ' + ( newVersions . map ( v => v . name ) . join ( ', ' ) || 'none' ) + '.' ) ) return newVersions } ) . catch ( e => console . log ( e . stack ) ) }
Filters bootswatch versions greater than latest update defined in update.json.
@return {Promise} Promise to be resolved with new versions.
Filters bootswatch versions greater than latest update defined in update . json .