Sfoglia il codice sorgente

Changed git.initialCommit method to add all yet unversioned files.

Szymon Kupś 10 anni fa
parent
commit
0a97a4dc6f
2 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. 2 1
      dev/tasks/tests/git.js
  2. 2 1
      dev/tasks/utils/git.js

+ 2 - 1
dev/tasks/tests/git.js

@@ -223,7 +223,8 @@ describe( 'utils', () => {
 				const repositoryPath = '/path/to/repo';
 				const repositoryPath = '/path/to/repo';
 				const commitCommands = [
 				const commitCommands = [
 					`cd ${ repositoryPath }`,
 					`cd ${ repositoryPath }`,
-					`git commit -am "Initial commit for ${ pluginName }."`
+					`git add .`,
+					`git commit -m "Initial commit for ${ pluginName }."`
 				];
 				];
 				toRestore.push( shExecStub );
 				toRestore.push( shExecStub );
 
 

+ 2 - 1
dev/tasks/utils/git.js

@@ -163,7 +163,8 @@ module.exports = {
 	initialCommit( pluginName, repositoryPath ) {
 	initialCommit( pluginName, repositoryPath ) {
 		const commitCommands = [
 		const commitCommands = [
 			`cd ${ repositoryPath }`,
 			`cd ${ repositoryPath }`,
-			`git commit -am "Initial commit for ${ pluginName }."`
+			`git add .`,
+			`git commit -m "Initial commit for ${ pluginName }."`
 		];
 		];
 
 
 		tools.shExec( commitCommands.join( ' && ' ) );
 		tools.shExec( commitCommands.join( ' && ' ) );