Sfoglia il codice sorgente

Removed alias for git-commit's --message parameter. Fixed order of variable declaration.

Maksymilian Barnaś 9 anni fa
parent
commit
8f08956c26
1 ha cambiato i file con 6 aggiunte e 4 eliminazioni
  1. 6 4
      dev/tasks/exec/functions/git-commit.js

+ 6 - 4
dev/tasks/exec/functions/git-commit.js

@@ -5,21 +5,23 @@
 
 
 'use strict';
 'use strict';
 
 
-const git = require( '../utils/git' );
+const git = require( '../lib/git' );
 const PassThrough = require( 'stream' ).PassThrough;
 const PassThrough = require( 'stream' ).PassThrough;
 
 
 /**
 /**
  * Adds only modified files to git repository and commits them with provided message
  * Adds only modified files to git repository and commits them with provided message
+ * Example: gulp exec --task git-commit --message "Commit message."
  *
  *
  * @param {String} workdir
  * @param {String} workdir
  * @param {Object} params
  * @param {Object} params
  * @returns {Object} stream
  * @returns {Object} stream
  */
  */
 module.exports = ( workdir, params ) => {
 module.exports = ( workdir, params ) => {
-	if ( !( params.message || params.m ) ) {
-		throw new Error( 'You must provide commit message with parameter: --message | -m ' );
+	const message = params.message;
+
+	if ( !message ) {
+		throw new Error( 'You must provide commit message with parameter: --message' );
 	}
 	}
-	const message = params.message || params.m;
 
 
 	git.commit( message, workdir );
 	git.commit( message, workdir );