Skip to content

Commit

Permalink
Support env in repository url (#539)
Browse files Browse the repository at this point in the history
* Support env in repository url

* Update version to 1.21.0-rc1

* correct wording

Co-authored-by: rentu <[email protected]>
  • Loading branch information
SLdragon and SLdragon authored Apr 2, 2020
1 parent 5c123e9 commit 9003076
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "azure-iot-edge",
"displayName": "Azure IoT Edge",
"description": "This extension is now a part of Azure IoT Tools extension pack. We highly recommend installing Azure IoT Tools to get full capabilities for Azure IoT development. Develop, deploy, debug, and manage your IoT Edge solution.",
"version": "1.21.0-rc",
"version": "1.21.0-rc1",
"publisher": "vsciot-vscode",
"aiKey": "95b20d64-f54f-4de3-8ad5-165a75a6c6fe",
"icon": "logo.png",
Expand Down
12 changes: 6 additions & 6 deletions src/common/utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,21 +586,21 @@ export class Utility {
hostName = null;
}

if (hostName && /[^a-zA-Z0-9\.\-:]/.test(hostName)) {
return "Repository host name can only contain alphanumeric characters or .-:";
if (hostName && /[^a-zA-Z0-9\.\-:\${}]/.test(hostName)) {
return "Repository host name can only contain alphanumeric characters or .-:, and ${} are also supported for environment variables";
}

if (/[^a-z0-9\._\-\/]+/.test(repositoryName)) {
return "Repository name can only contain lowercase letters, digits or ._-/";
if (/[^a-z0-9\._\-\/\${}]+/.test(repositoryName)) {
return "Repository name can only contain lowercase letters, digits or ._-/, and ${} are also supported for environment variables";
}

if (tag) {
if (tag.length > 128) {
return "The maximum length of tag is 128";
}

if (/[^a-zA-Z0-9\._\-]+/.test(tag)) {
return "Tag can only contain alphanumeric characters or ._-";
if (/[^a-zA-Z0-9\._\-\${}]+/.test(tag)) {
return "Tag can only contain alphanumeric characters or ._-, and ${} are also supported for environment variables";
}
}

Expand Down

0 comments on commit 9003076

Please sign in to comment.