build.js
function releaseTheme(theme, version) {
  const repoPath = `.tmp/${version}/${theme}/publish`
  return setupThemeRepo(theme, version)
    .then(() => {
      console.log(chalk.blue('Committing changes...'))
      return new Promise((resolve, reject) => {
        // commit changes
        git.add(['css', 'js', 'fonts', 'bower.json', 'package.json'], (err) =>{
          if (err) return reject(err)
          git.commit(`${version} upgrade :arrow_up:`, ['.'], (err, res) => {
            if (err) return reject(err)
            // tag current version (3.3.7-cerulean)
            git.addTag(cleanVersion(version) + '-' + theme, (err) => {
              if (err) return reject(err)
              console.log(chalk.blue('Pushing commit...'))
              // push commit
              git.push('origin', theme, (err) => {
                if (err) return reject(err)
                console.log(chalk.blue('Pushing tag...'))
                // push new tag
                git.pushTags('origin', (err) => {
                  if (err) return reject(err)
                  console.log(chalk.green(`${theme} published.`))
                  resolve()
                })
              })
            })
          })
        })
      })
    })
}
function releaseTheme(theme, version) {
  const repoPath = `.tmp/${version}/${theme}/publish`
  return setupThemeRepo(theme, version)
    .then(() => {
      console.log(chalk.blue('Committing changes...'))
      return new Promise((resolve, reject) => {
        // commit changes
        git.add(['css', 'js', 'fonts', 'bower.json', 'package.json'], (err) =>{
          if (err) return reject(err)
          git.commit(`${version} upgrade :arrow_up:`, ['.'], (err, res) => {
            if (err) return reject(err)
            // tag current version (3.3.7-cerulean)
            git.addTag(cleanVersion(version) + '-' + theme, (err) => {
              if (err) return reject(err)
              console.log(chalk.blue('Pushing commit...'))
              // push commit
              git.push('origin', theme, (err) => {
                if (err) return reject(err)
                console.log(chalk.blue('Pushing tag...'))
                // push new tag
                git.pushTags('origin', (err) => {
                  if (err) return reject(err)
                  console.log(chalk.green(`${theme} published.`))
                  resolve()
                })
              })
            })
          })
        })
      })
    })
}
function releaseTheme ( theme , version ) { const repoPath = ` ${ version } ${ theme } ` return setupThemeRepo ( theme , version ) . then ( ( ) => { console . log ( chalk . blue ( 'Committing changes...' ) ) return new Promise ( ( resolve , reject ) => { // commit changes git . add ( [ 'css' , 'js' , 'fonts' , 'bower.json' , 'package.json' ] , ( err ) => { if ( err ) return reject ( err ) git . commit ( ` ${ version } ` , [ '.' ] , ( err , res ) => { if ( err ) return reject ( err ) // tag current version (3.3.7-cerulean) git . addTag ( cleanVersion ( version ) + '-' + theme , ( err ) => { if ( err ) return reject ( err ) console . log ( chalk . blue ( 'Pushing commit...' ) ) // push commit git . push ( 'origin' , theme , ( err ) => { if ( err ) return reject ( err ) console . log ( chalk . blue ( 'Pushing tag...' ) ) // push new tag git . pushTags ( 'origin' , ( err ) => { if ( err ) return reject ( err ) console . log ( chalk . green ( ` ${ theme } ` ) ) resolve ( ) } ) } ) } ) } ) } ) } ) } ) }
Releases new theme version
@param  {String} theme   Theme name
@param  {String} version Semver
@return {Promise}
Releases new theme version