wp-blank-scripts 2.6.4 → 2.6.5

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.
@@ -177,16 +177,17 @@ async function deployToServer() {
177
177
 
178
178
  async function connectMySQL() {
179
179
  // Environment info
180
- const { host } = settings.server[options.environment];
180
+ const { host, port } = settings.server[options.environment];
181
181
  const { user, password, database } = settings.mysql[options.environment];
182
182
 
183
183
  // Tunnel info
184
184
  const { tunnelHost, tunnelPort } = options;
185
+ const useTunnel = !isCI();
185
186
 
186
187
  return new Promise((resolve, reject) => {
187
188
  m = mysql.createConnection({
188
- host: tunnelHost,
189
- port: tunnelPort,
189
+ host: useTunnel ? tunnelHost : host,
190
+ port: useTunnel ? tunnelPort : port,
190
191
  user,
191
192
  password,
192
193
  database,
@@ -270,7 +271,9 @@ module.exports = async (selectOptions, callbacks) => {
270
271
  }
271
272
 
272
273
  if (options.sql) {
273
- await createTunnel();
274
+ if (!isCI()) {
275
+ await createTunnel();
276
+ }
274
277
  await connectMySQL();
275
278
  const file = isCI()
276
279
  ? getMostRecentSqlFile(true)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wp-blank-scripts",
3
- "version": "2.6.4",
3
+ "version": "2.6.5",
4
4
  "description": "Personal Wordpress Scripts",
5
5
  "main": "index.js",
6
6
  "bin": {