Add full huishou project
This commit is contained in:
+11
-3
@@ -6,13 +6,21 @@ try {
|
|||||||
console.log('=== Add all files ===');
|
console.log('=== Add all files ===');
|
||||||
execSync(`${gitPath} add .`, { stdio: 'inherit', cwd: __dirname });
|
execSync(`${gitPath} add .`, { stdio: 'inherit', cwd: __dirname });
|
||||||
|
|
||||||
console.log('=== Commit code ===');
|
console.log('=== Commit all files ===');
|
||||||
execSync(`${gitPath} commit -m "Initial commit - huishou project"`, { stdio: 'inherit', cwd: __dirname });
|
execSync(`${gitPath} commit -m "Add full huishou project"`, { stdio: 'inherit', cwd: __dirname });
|
||||||
|
|
||||||
console.log('=== Push to remote ===');
|
console.log('=== Push to remote ===');
|
||||||
execSync(`${gitPath} push -u origin master`, { stdio: 'inherit', cwd: __dirname });
|
const env = { ...process.env };
|
||||||
|
env.GIT_SSH_COMMAND = 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null';
|
||||||
|
|
||||||
|
execSync(`${gitPath} push origin master`, {
|
||||||
|
stdio: 'inherit',
|
||||||
|
cwd: __dirname,
|
||||||
|
env: env
|
||||||
|
});
|
||||||
|
|
||||||
console.log('=== Success ===');
|
console.log('=== Success ===');
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('=== Failed ===');
|
console.error('=== Failed ===');
|
||||||
console.error('Exit code:', error.status);
|
console.error('Exit code:', error.status);
|
||||||
|
|||||||
Reference in New Issue
Block a user