Skip to content

Commit

Permalink
support dockerfile name variations
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdias committed Mar 28, 2017
1 parent 546ee72 commit f7c8ecf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,4 +1,7 @@

## 0.0.14 - 27 March 2017
* Support different variations on naming of `dockerfile` such as `dockerfile-development`

## 0.0.13 - 14 March 2017
* Support for `.yaml` file extension on `docker-compose` files.
* Updated Azure CLI image name, map .azure folder from host file system, fix block running on Windowns containers, fix Windows path issues (this didn't make it into `0.0.12`)
Expand Down
4 changes: 3 additions & 1 deletion commands/build-image.ts
@@ -1,6 +1,8 @@
import * as path from "path";
import * as vscode from "vscode";
import { reporter } from '../telemetry/telemetry';
import { DOCKERFILE_GLOB_PATTERN } from '../dockerExtension';

const teleCmdId: string = 'vscode-docker.image.build';

function hasWorkspaceFolder(): boolean {
Expand All @@ -11,7 +13,7 @@ function getDockerFileUris(): Thenable<vscode.Uri[]> {
if (!hasWorkspaceFolder()) {
return Promise.resolve(null);
}
return Promise.resolve(vscode.workspace.findFiles('**/[dD]ocker[fF]ile', null, 9999, null));
return Promise.resolve(vscode.workspace.findFiles(DOCKERFILE_GLOB_PATTERN, null, 1000, null));
}

interface Item extends vscode.QuickPickItem {
Expand Down
4 changes: 3 additions & 1 deletion dockerExtension.ts
Expand Up @@ -24,7 +24,9 @@ import { scheduleValidate } from './linting/dockerLinting';
import { systemPrune } from './commands/system-prune';
import { Reporter } from './telemetry/telemetry';

export const COMPOSE_FILE_GLOB_PATTERN = '**/docker-compose*.{yaml,yml}';
export const COMPOSE_FILE_GLOB_PATTERN = '**/[dD]ocker-[cC]ompose*.{yaml,yml}';
export const DOCKERFILE_GLOB_PATTERN = '**/[dD]ocker[fF]ile*';

export var diagnosticCollection: vscode.DiagnosticCollection;

export type KeyInfo = { [keyName: string]: string; };
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "vscode-docker",
"version": "0.0.13",
"version": "0.0.14",
"publisher": "PeterJausovec",
"displayName": "Docker",
"description": "Adds syntax highlighting, snippets, commands, hover tips, and linting for Dockerfile and docker-compose files.",
Expand Down

0 comments on commit f7c8ecf

Please sign in to comment.