|
2 | 2 | * Copyright (c) Red Hat, Inc. All rights reserved. |
3 | 3 | * Licensed under the MIT License. See LICENSE file in the project root for license information. |
4 | 4 | *-----------------------------------------------------------------------------------------------*/ |
5 | | -import * as vscode from 'vscode'; |
6 | | -import * as path from 'path'; |
7 | 5 | import * as fs from 'fs'; |
| 6 | +import * as path from 'path'; |
| 7 | +import * as vscode from 'vscode'; |
8 | 8 | import * as YAML from 'yaml'; |
9 | | -import { ExtensionID } from '../../util/constants'; |
10 | | -import { ComponentTypesView } from '../../registriesView'; |
| 9 | +import { OdoImpl } from '../../odo'; |
11 | 10 | import { AnalyzeResponse, ComponentTypeDescription } from '../../odo/componentType'; |
| 11 | +import { ComponentDescription, Endpoint } from '../../odo/componentTypeDescription'; |
| 12 | +import { ComponentWorkspaceFolder } from '../../odo/workspace'; |
| 13 | +import * as odo3 from '../../odo3'; |
12 | 14 | import { Component } from '../../openshift/component'; |
13 | 15 | import OpenShiftItem from '../../openshift/openshiftItem'; |
| 16 | +import { ComponentTypesView } from '../../registriesView'; |
| 17 | +import { ExtensionID } from '../../util/constants'; |
14 | 18 | import { selectWorkspaceFolder } from '../../util/workspace'; |
| 19 | +import { vsCommand } from '../../vscommand'; |
| 20 | +import { DevfileConverter } from './devfileConverter'; |
15 | 21 | import GitUrlParse = require('git-url-parse'); |
16 | 22 | import treeKill = require('tree-kill') |
17 | 23 | import cp = require('child_process'); |
18 | | -import { vsCommand } from '../../vscommand'; |
19 | | -import * as odo3 from '../../odo3'; |
20 | | -import { ComponentDescription, Endpoint } from '../../odo/componentTypeDescription'; |
21 | | -import { ComponentWorkspaceFolder } from '../../odo/workspace'; |
22 | | -import { OdoImpl } from '../../odo'; |
23 | | -import { DevfileConverter } from './devfileConverter'; |
24 | 24 | let panel: vscode.WebviewPanel; |
25 | 25 | let childProcess: cp.ChildProcess; |
26 | 26 | let forceCancel = false; |
@@ -354,7 +354,7 @@ function validateComponentName(event: any) { |
354 | 354 |
|
355 | 355 | function validateDevFilePath(event: any) { |
356 | 356 | let validationMessage = OpenShiftItem.emptyName(`Required ${event.param}`, event.param.trim()); |
357 | | - if (!validationMessage) validationMessage = OpenShiftItem.validateFilePath(`Not matches ^[a-z]:((\/|\\\\)[a-zA-Z0-9_ \\-]+)+\\.yaml$`, event.param); |
| 357 | + if (!validationMessage) validationMessage = OpenShiftItem.validateFilePath(`Devfile must be called devfile.yaml (or devfile.yml) for the tooling to recognize it`, event.param); |
358 | 358 | if (!validationMessage && event.param !== 'devfile.yaml' && event.param !== 'devfile.yml') { |
359 | 359 | const uri = vscode.Uri.parse(event.param); |
360 | 360 | const devFileLocation = path.join(uri.fsPath); |
|
0 commit comments