wp-blank-scripts 2.6.3 → 2.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -0
- package/lib/deployProject.js +9 -2
- package/package.json +1 -1
package/index.js
CHANGED
package/lib/deployProject.js
CHANGED
|
@@ -11,6 +11,7 @@ const getMostRecentSqlFile = require('../utils/getMostRecentSqlFile');
|
|
|
11
11
|
const runProjectBuildTask = require('../utils/runProjectBuildTask');
|
|
12
12
|
const bumpVersion = require('../utils/bumpVersion');
|
|
13
13
|
const isCI = require('../utils/isCI');
|
|
14
|
+
const execAsync = require('../utils/execAsync');
|
|
14
15
|
const { DEPLOY_MODES } = require('../constants');
|
|
15
16
|
const getProjectPath = require('../utils/getProjectPath');
|
|
16
17
|
const getSettings = require('../utils/projectSettings');
|
|
@@ -19,8 +20,8 @@ const replaceSQL = require('../utils/replaceSQL');
|
|
|
19
20
|
|
|
20
21
|
// Default options
|
|
21
22
|
const defaultOptions = {
|
|
22
|
-
tunnelHost: '
|
|
23
|
-
tunnelPort:
|
|
23
|
+
tunnelHost: '127.0.0.1',
|
|
24
|
+
tunnelPort: 3307,
|
|
24
25
|
mySQLPort: 3306,
|
|
25
26
|
};
|
|
26
27
|
|
|
@@ -68,6 +69,12 @@ async function createTunnel() {
|
|
|
68
69
|
|
|
69
70
|
const { tunnelHost, tunnelPort, mySQLPort } = options;
|
|
70
71
|
|
|
72
|
+
if (isCI()) {
|
|
73
|
+
execAsync(`ssh -L ${tunnelPort}:${tunnelHost}:${mySQLPort} -N ${server.user}@${server.host}`);
|
|
74
|
+
logger.log(`Created tunnel to ${server.host}`);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
71
78
|
let serverPrivateKey;
|
|
72
79
|
if (options.serverPrivateKey) {
|
|
73
80
|
serverPrivateKey = fs.readFileSync(cleanShellPath(options.serverPrivateKey));
|