Skip to content
Snippets Groups Projects
Commit ba614d46 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix: support quotation marks for circleci

Fixes #1745
parent 9a28852e
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,7 @@ function extractDependencies(content) { ...@@ -9,7 +9,7 @@ function extractDependencies(content) {
const deps = []; const deps = [];
let lineNumber = 0; let lineNumber = 0;
for (const line of content.split('\n')) { for (const line of content.split('\n')) {
const match = line.match(/^\s*- image:\s*([^\s]+)\s*$/); const match = line.match(/^\s*- image:\s*'?"?([^\s'"]+)'?"?\s*$/);
if (match) { if (match) {
const currentFrom = match[1]; const currentFrom = match[1];
const { const {
......
...@@ -7,7 +7,7 @@ function setNewValue(currentFileContent, upgrade) { ...@@ -7,7 +7,7 @@ function setNewValue(currentFileContent, upgrade) {
logger.debug(`circleci.setNewValue: ${upgrade.newFrom}`); logger.debug(`circleci.setNewValue: ${upgrade.newFrom}`);
const lines = currentFileContent.split('\n'); const lines = currentFileContent.split('\n');
const lineToChange = lines[upgrade.lineNumber]; const lineToChange = lines[upgrade.lineNumber];
const imageLine = new RegExp(/^(\s*- image:\s*)[^\s]+(\s*)$/); const imageLine = new RegExp(/^(\s*- image:\s*'?"?)[^\s'"]+('?"?\s*)$/);
if (!lineToChange.match(imageLine)) { if (!lineToChange.match(imageLine)) {
logger.debug('No image line found'); logger.debug('No image line found');
return null; return null;
......
...@@ -55,7 +55,7 @@ jobs: ...@@ -55,7 +55,7 @@ jobs:
node-v4: node-v4:
<<: *node-base <<: *node-base
docker: docker:
- image: node:4 - image: 'node:4'
node-v6: node-v6:
<<: *node-base <<: *node-base
docker: docker:
...@@ -63,4 +63,4 @@ jobs: ...@@ -63,4 +63,4 @@ jobs:
node-v8: node-v8:
<<: *node-base <<: *node-base
docker: docker:
- image: node:8.9.0 - image: "node:8.9.0"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment