mirror of
				https://github.com/easingthemes/ssh-deploy.git
				synced 2025-10-30 23:30:09 +08:00 
			
		
		
		
	Removed console.log
This commit is contained in:
		
							parent
							
								
									733f9fc153
								
							
						
					
					
						commit
						19dbe22d4f
					
				
							
								
								
									
										12
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							| @ -480,26 +480,28 @@ const commandExists = __webpack_require__(677); | |||||||
| const nodeCmd = __webpack_require__(428); | const nodeCmd = __webpack_require__(428); | ||||||
| const nodeRsync = __webpack_require__(250); | const nodeRsync = __webpack_require__(250); | ||||||
| 
 | 
 | ||||||
| const vars = { REMOTE_HOST, REMOTE_USER, REMOTE_PORT, SSH_PRIVATE_KEY, DEPLOY_KEY_NAME, SOURCE, TARGET, ARGS, GITHUB_WORKSPACE, HOME } = process.env; | const { REMOTE_HOST, REMOTE_USER, REMOTE_PORT, SSH_PRIVATE_KEY, DEPLOY_KEY_NAME, SOURCE, TARGET, ARGS, GITHUB_WORKSPACE, HOME } = process.env; | ||||||
| 
 |  | ||||||
| console.log(vars); |  | ||||||
| 
 | 
 | ||||||
| const sshDeploy = (() => { | const sshDeploy = (() => { | ||||||
|     const rsync = ({ privateKey, port, src, dest, args }) => { |     const rsync = ({ privateKey, port, src, dest, args }) => { | ||||||
|         console.log(`Starting Rsync Action: ${src} to ${dest}`); |         console.log(`Starting Rsync Action: ${src} to ${dest}`); | ||||||
| 
 | 
 | ||||||
|  |         console.log(privateKey, port, src, dest, args); | ||||||
|  | 
 | ||||||
|         try { |         try { | ||||||
|             // RSYNC COMMAND
 |             // RSYNC COMMAND
 | ||||||
|             nodeRsync({ src, dest, args, privateKey, ssh: false, port, sshCmdArgs: ['-o StrictHostKeyChecking=no'], recursive: true }, (error, stdout, stderr, cmd) => { |             nodeRsync({ src, dest, args, privateKey, ssh: false, port, sshCmdArgs: ['-o StrictHostKeyChecking=no'], recursive: true }, (error, stdout, stderr, cmd) => { | ||||||
|                 if (error) { |                 if (error) { | ||||||
|                     console.error('⚠️ Rsync error', error.message); |                     console.error('⚠️ Rsync error', error); | ||||||
|  |                     console.log(stderr); | ||||||
|  |                     console.log(stdout); | ||||||
|                     process.abort(); |                     process.abort(); | ||||||
|                 } else { |                 } else { | ||||||
|                     console.log("✅ Rsync finished.", stdout); |                     console.log("✅ Rsync finished.", stdout); | ||||||
|                 } |                 } | ||||||
|             }); |             }); | ||||||
|         } catch (err) { |         } catch (err) { | ||||||
|             console.error(`⚠️ An error happened:(.`, err.message, err.stack); |             console.error(`⚠️ An error happened:(.`, err); | ||||||
|             process.abort(); |             process.abort(); | ||||||
|         } |         } | ||||||
|     }; |     }; | ||||||
|  | |||||||
							
								
								
									
										12
									
								
								src/index.js
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								src/index.js
									
									
									
									
									
								
							| @ -5,26 +5,28 @@ const commandExists = require('command-exists'); | |||||||
| const nodeCmd = require('node-cmd'); | const nodeCmd = require('node-cmd'); | ||||||
| const nodeRsync = require('rsyncwrapper'); | const nodeRsync = require('rsyncwrapper'); | ||||||
| 
 | 
 | ||||||
| const vars = { REMOTE_HOST, REMOTE_USER, REMOTE_PORT, SSH_PRIVATE_KEY, DEPLOY_KEY_NAME, SOURCE, TARGET, ARGS, GITHUB_WORKSPACE, HOME } = process.env; | const { REMOTE_HOST, REMOTE_USER, REMOTE_PORT, SSH_PRIVATE_KEY, DEPLOY_KEY_NAME, SOURCE, TARGET, ARGS, GITHUB_WORKSPACE, HOME } = process.env; | ||||||
| 
 |  | ||||||
| console.log(vars); |  | ||||||
| 
 | 
 | ||||||
| const sshDeploy = (() => { | const sshDeploy = (() => { | ||||||
|     const rsync = ({ privateKey, port, src, dest, args }) => { |     const rsync = ({ privateKey, port, src, dest, args }) => { | ||||||
|         console.log(`Starting Rsync Action: ${src} to ${dest}`); |         console.log(`Starting Rsync Action: ${src} to ${dest}`); | ||||||
| 
 | 
 | ||||||
|  |         console.log(privateKey, port, src, dest, args); | ||||||
|  | 
 | ||||||
|         try { |         try { | ||||||
|             // RSYNC COMMAND
 |             // RSYNC COMMAND
 | ||||||
|             nodeRsync({ src, dest, args, privateKey, ssh: false, port, sshCmdArgs: ['-o StrictHostKeyChecking=no'], recursive: true }, (error, stdout, stderr, cmd) => { |             nodeRsync({ src, dest, args, privateKey, ssh: false, port, sshCmdArgs: ['-o StrictHostKeyChecking=no'], recursive: true }, (error, stdout, stderr, cmd) => { | ||||||
|                 if (error) { |                 if (error) { | ||||||
|                     console.error('⚠️ Rsync error', error.message); |                     console.error('⚠️ Rsync error', error); | ||||||
|  |                     console.log(stderr); | ||||||
|  |                     console.log(stdout); | ||||||
|                     process.abort(); |                     process.abort(); | ||||||
|                 } else { |                 } else { | ||||||
|                     console.log("✅ Rsync finished.", stdout); |                     console.log("✅ Rsync finished.", stdout); | ||||||
|                 } |                 } | ||||||
|             }); |             }); | ||||||
|         } catch (err) { |         } catch (err) { | ||||||
|             console.error(`⚠️ An error happened:(.`, err.message, err.stack); |             console.error(`⚠️ An error happened:(.`, err); | ||||||
|             process.abort(); |             process.abort(); | ||||||
|         } |         } | ||||||
|     }; |     }; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 GarryOne
						GarryOne