mirror of
				https://github.com/easingthemes/ssh-deploy.git
				synced 2025-10-30 23:30:09 +08:00 
			
		
		
		
	Add remote port
This commit is contained in:
		
							parent
							
								
									845b7f6f1f
								
							
						
					
					
						commit
						0a1df91f97
					
				
							
								
								
									
										2
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										4
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -1,12 +1,12 @@ | |||||||
| { | { | ||||||
|   "name": "@draganfilipovic/ssh-deploy", |   "name": "@draganfilipovic/ssh-deploy", | ||||||
|   "version": "4.0.3", |   "version": "4.0.4", | ||||||
|   "lockfileVersion": 2, |   "lockfileVersion": 2, | ||||||
|   "requires": true, |   "requires": true, | ||||||
|   "packages": { |   "packages": { | ||||||
|     "": { |     "": { | ||||||
|       "name": "@draganfilipovic/ssh-deploy", |       "name": "@draganfilipovic/ssh-deploy", | ||||||
|       "version": "4.0.3", |       "version": "4.0.4", | ||||||
|       "license": "MIT", |       "license": "MIT", | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "rsyncwrapper": "^3.0.1" |         "rsyncwrapper": "^3.0.1" | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| const { exec } = require('child_process'); | const { exec } = require('child_process'); | ||||||
| const { sshServer, githubWorkspace } = require('./inputs'); | const { sshServer, githubWorkspace, remotePort } = require('./inputs'); | ||||||
| const { writeToFile } = require('./helpers'); | const { writeToFile } = require('./helpers'); | ||||||
| 
 | 
 | ||||||
| const handleError = (message, isRequired, callback) => { | const handleError = (message, isRequired, callback) => { | ||||||
| @ -17,7 +17,7 @@ const remoteCmd = async (content, privateKeyPath, isRequired, label) => new Prom | |||||||
|     writeToFile({ dir: githubWorkspace, filename, content }); |     writeToFile({ dir: githubWorkspace, filename, content }); | ||||||
|     console.log(`Executing remote script: ssh -i ${privateKeyPath} ${sshServer}`); |     console.log(`Executing remote script: ssh -i ${privateKeyPath} ${sshServer}`); | ||||||
|     exec( |     exec( | ||||||
|       `DEBIAN_FRONTEND=noninteractive ssh -i ${privateKeyPath} -o StrictHostKeyChecking=no ${sshServer} 'RSYNC_STDOUT="${process.env.RSYNC_STDOUT}" bash -s' < ${filename}`, |       `DEBIAN_FRONTEND=noninteractive ssh -p ${(remotePort || 22)} -i ${privateKeyPath} -o StrictHostKeyChecking=no ${sshServer} 'RSYNC_STDOUT="${process.env.RSYNC_STDOUT}" bash -s' < ${filename}`, | ||||||
|       (err, data, stderr) => { |       (err, data, stderr) => { | ||||||
|         if (err) { |         if (err) { | ||||||
|           const message = `⚠️ [CMD] Remote script failed: ${err.message}`; |           const message = `⚠️ [CMD] Remote script failed: ${err.message}`; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Nicholas Piasecki
						Nicholas Piasecki