<commit_before>/*
 * grunt-audiotheme
 * http://audiotheme.com/
 *
 * Copyright (c) 2013 AudioTheme, LLC
 * Licensed under the MIT license.
 */

'use strict';

module.exports = function(grunt) {

	var pkg = grunt.file.readJSON('package.json');

	// Alias release task for faster access.
	grunt.registerTask('release', function(version) {
		version = version ? ':' + version : '';
		grunt.task.run('audiotheme-release' + version);
	});

	/**
	 * The main release task.
	 *
	 * Runs the build process first.
	 */
	grunt.registerTask('audiotheme-release', function(version) {
		version = version || pkg.version;

		grunt.task.requires('audiotheme-setup');

		if ('theme' === grunt.option('audiotheme-type')) {
			grunt.task.run('audiotheme-build:' + version);
			grunt.task.run('audiotheme-release-theme:' + version);
		}
	});

	/**
	 * Upload the theme.
	 *
	 * Uses credentials specified in config.json in the project root.
	 */
	grunt.registerTask('audiotheme-release-theme', function(version) {
		if (undefined === version) {
			grunt.warn('Version must be defined for the audiotheme-release-theme task.');
		}

		// @todo git tag, commit, and push to origin

		// Set a reference to the most recent build in order to upload it.
		if (undefined === grunt.config.get('sftp.release.files')) {
			grunt.config.set('sftp.release.files', {
				'./': ['release/' + pkg.name.toLowerCase() + '-' + version + '.zip']
			});
		}

		grunt.task.run('sftp:release');
	});

};<commit_msg>Test for the package archive in the release task.<commit_after>/*
 * grunt-audiotheme
 * http://audiotheme.com/
 *
 * Copyright (c) 2013 AudioTheme, LLC
 * Licensed under the MIT license.
 */

'use strict';

module.exports = function(grunt) {

	var pkg = grunt.file.readJSON('package.json');

	// Alias release task for faster access.
	grunt.registerTask('release', function(version) {
		version = version ? ':' + version : '';
		grunt.task.run('audiotheme-release' + version);
	});

	/**
	 * The main release task.
	 *
	 * Runs the build process first.
	 */
	grunt.registerTask('audiotheme-release', function(version) {
		version = version || pkg.version;

		grunt.task.requires('audiotheme-setup');

		if ('theme' === grunt.option('audiotheme-type')) {
			grunt.task.run('audiotheme-build:' + version);
			grunt.task.run('audiotheme-release-theme:' + version);
		}
	});

	/**
	 * Upload the theme.
	 *
	 * Uses credentials specified in config.json in the project root.
	 */
	grunt.registerTask('audiotheme-release-theme', function(version) {
		var file = 'release/' + pkg.name.toLowerCase() + '-' + version + '.zip';

		if (undefined === version) {
			grunt.warn('Version must be defined for the audiotheme-release-theme task.');
		}

		if (!grunt.file.exists(file)) {
			grunt.warn('The package archive doesn\'t exist at: ' + file);
		}

		// Set a reference to the most recent build in order to upload it.
		if (undefined === grunt.config.get('sftp.release.files')) {
			grunt.config.set('sftp.release.files', {
				'./': [ file ]
			});
		}

		grunt.task.run('sftp:release');
	});

};
{'fraction_non_alphanumeric': 0.17003916449086162, 'fraction_numerical': 0.0026109660574412533, 'mean_word_length': 3.4809941520467835, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6135033', 'n_tokens_mistral': 1128, 'n_tokens_neox': 1000, 'n_words': 232}