'use strict';

var gulp = require('gulp');
var argv = require('yargs').argv;
var gutil = require('gulp-util');

require('./publish');



var checkArguments = done => {
  if (!argv.tag || argv.tag === true){
    gutil.log(gutil.colors.red('Error running task : --tag undefined'));
    process.exit(2);
  }
  else{
    done();
  }
};

gulp.task('publish-tag' , gulp.series(checkArguments, 'publish'));