4
0
Fork 0
mirror of https://github.com/Azure/setup-helm.git synced 2025-11-07 13:06:56 +00:00

Escape slash for nodejs

This commit is contained in:
Asa Gayle 2022-01-13 17:34:03 -05:00
parent db9832f989
commit db3e6df453
2 changed files with 4 additions and 4 deletions

View file

@ -49,7 +49,7 @@ var exec = require("@actions/exec");
var toolCache = require("@actions/tool-cache");
var core = require("@actions/core");
var helmToolName = 'helm';
var stableHelmVersion = 'v3.7.1';
var stableHelmVersion = 'v3.7.2';
var helmAllReleasesUrl = 'https://api.github.com/repos/helm/helm/releases';
function getExecutableExtension() {
if (os.type().match(/^Win/)) {
@ -174,7 +174,7 @@ function getLatestHelmVersion() {
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
command = "curl -Ls https://api.github.com/repos/helm/helm/releases | grep 'v3.[0-9]*.[0-9]*' | sed -E 's/ .*/helm/helm/releases/tag/tag/(v[0-9.]+)\".*/1/g' | head -1 | sed -E 's/.*tag///' | sed -E 's/\".*//'";
command = "curl -Ls https://api.github.com/repos/helm/helm/releases | grep 'v3.[0-9]*.[0-9]*' | sed -E 's/ .*/helm/helm/releases/tag/tag/(v[0-9.]+)\".*/\\1/g' | head -1 | sed -E 's/.*tag///' | sed -E 's/\".*//'";
latestHelm = "";
latestHelmErr = "";
options = {};

View file

@ -14,7 +14,7 @@ import * as toolCache from '@actions/tool-cache';
import * as core from '@actions/core';
const helmToolName = 'helm';
const stableHelmVersion = 'v3.7.1';
const stableHelmVersion = 'v3.7.2';
const helmAllReleasesUrl = 'https://api.github.com/repos/helm/helm/releases';
export function getExecutableExtension(): string {
@ -106,7 +106,7 @@ export async function downloadHelm(version: string): Promise<string> {
}
async function getLatestHelmVersion(): Promise<string>{
const command:string = `curl -Ls https://api.github.com/repos/helm/helm/releases | grep 'v3.[0-9]*.[0-9]*' | sed -E 's/ .*\/helm\/helm\/releases\/tag\/tag\/(v[0-9\.]+)".*/\1/g' | head -1 | sed -E 's/.*tag\///' | sed -E 's/".*//'`;
const command:string = `curl -Ls https://api.github.com/repos/helm/helm/releases | grep 'v3.[0-9]*.[0-9]*' | sed -E 's/ .*\/helm\/helm\/releases\/tag\/tag\/(v[0-9\.]+)".*/\\1/g' | head -1 | sed -E 's/.*tag\///' | sed -E 's/".*//'`;
let latestHelm: string = "";
let latestHelmErr: string = "";