2021-02-08 20:07:42 +05:30
|
|
|
/***************************************************************************************************
|
|
|
|
* Copyright (c) Red Hat, Inc. All rights reserved.
|
|
|
|
* Licensed under the MIT License. See LICENSE file in the project root for license information.
|
|
|
|
**************************************************************************************************/
|
|
|
|
|
|
|
|
export function splitByNewline(s: string): string[] {
|
|
|
|
return s.split(/\r?\n/);
|
|
|
|
}
|
2021-10-06 22:07:09 +00:00
|
|
|
|
|
|
|
export function isFullImageName(image: string): boolean {
|
|
|
|
return image.indexOf(":") > 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function getFullImageName(image: string, tag: string): string {
|
|
|
|
if (isFullImageName(tag)) {
|
|
|
|
return tag;
|
|
|
|
}
|
|
|
|
return `${image}:${tag}`;
|
|
|
|
}
|