v3 new release (#78)
* Bump ansi-regex from 5.0.0 to 5.0.1 (#56) Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1. - [Release notes](https://github.com/chalk/ansi-regex/releases) - [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1) --- updated-dependencies: - dependency-name: ansi-regex dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Vidya reddy prettier (#58) * upgraded to Node16 * Enforce Prettier * code fix * jest version change and prettify code Co-authored-by: Vidya Reddy <vidyareddy@microsoft.com> * Upgraded the ncc version (#61) Co-authored-by: Vidya Reddy <vidyareddy@microsoft.com> * Update README example to v3 (#60) * Bump @actions/core from 1.9.0 to 1.9.1 (#63) Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.9.0 to 1.9.1. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core) --- updated-dependencies: - dependency-name: "@actions/core" dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add the issue report and feature request form (#64) * syntax error fixes (#66) * added support message (#67) * Bump @actions/core (#68) to address https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ * Bump decode-uri-component from 0.2.0 to 0.2.2 (#73) Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. - [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases) - [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2) --- updated-dependencies: - dependency-name: decode-uri-component dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * change uri (#77) * Add node modules and compiled JavaScript from main Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Vidya Reddy <59590642+Vidya2606@users.noreply.github.com> Co-authored-by: Vidya Reddy <vidyareddy@microsoft.com> Co-authored-by: Oliver King <olivermerkleyking@gmail.com> Co-authored-by: Asa Gayle <azmatch.gayle@gmail.com> Co-authored-by: Sumner Warren <sumner.warren@gmail.com> Co-authored-by: Oliver King <oking3@uncc.edu>
This commit is contained in:
parent
e1be5e75ed
commit
901a10e89e
4 changed files with 15 additions and 28 deletions
|
@ -7157,7 +7157,6 @@ module.exports = v4;
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.getExecutableExtension = exports.getkubectlDownloadURL = exports.getKubectlArch = void 0;
|
exports.getExecutableExtension = exports.getkubectlDownloadURL = exports.getKubectlArch = void 0;
|
||||||
const os = __nccwpck_require__(2037);
|
const os = __nccwpck_require__(2037);
|
||||||
const util = __nccwpck_require__(3837);
|
|
||||||
function getKubectlArch() {
|
function getKubectlArch() {
|
||||||
const arch = os.arch();
|
const arch = os.arch();
|
||||||
if (arch === 'x64') {
|
if (arch === 'x64') {
|
||||||
|
@ -7169,12 +7168,12 @@ exports.getKubectlArch = getKubectlArch;
|
||||||
function getkubectlDownloadURL(version, arch) {
|
function getkubectlDownloadURL(version, arch) {
|
||||||
switch (os.type()) {
|
switch (os.type()) {
|
||||||
case 'Linux':
|
case 'Linux':
|
||||||
return util.format('https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/%s/kubectl', version, arch);
|
return `https://dl.k8s.io/release/${version}/bin/linux/${arch}/kubectl`;
|
||||||
case 'Darwin':
|
case 'Darwin':
|
||||||
return util.format('https://storage.googleapis.com/kubernetes-release/release/%s/bin/darwin/%s/kubectl', version, arch);
|
return `https://dl.k8s.io/release/${version}/bin/darwin/${arch}/kubectl`;
|
||||||
case 'Windows_NT':
|
case 'Windows_NT':
|
||||||
default:
|
default:
|
||||||
return util.format('https://storage.googleapis.com/kubernetes-release/release/%s/bin/windows/%s/kubectl.exe', version, arch);
|
return `https://dl.k8s.io/release/${version}/bin/windows/${arch}/kubectl.exe`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.getkubectlDownloadURL = getkubectlDownloadURL;
|
exports.getkubectlDownloadURL = getkubectlDownloadURL;
|
||||||
|
|
12
package-lock.json
generated
12
package-lock.json
generated
|
@ -1892,9 +1892,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/decode-uri-component": {
|
"node_modules/decode-uri-component": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
|
||||||
"integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==",
|
"integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10"
|
"node": ">=0.10"
|
||||||
|
@ -7664,9 +7664,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"decode-uri-component": {
|
"decode-uri-component": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
|
||||||
"integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==",
|
"integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"deep-is": {
|
"deep-is": {
|
||||||
|
|
|
@ -12,26 +12,14 @@ export function getKubectlArch(): string {
|
||||||
export function getkubectlDownloadURL(version: string, arch: string): string {
|
export function getkubectlDownloadURL(version: string, arch: string): string {
|
||||||
switch (os.type()) {
|
switch (os.type()) {
|
||||||
case 'Linux':
|
case 'Linux':
|
||||||
return util.format(
|
return `https://dl.k8s.io/release/${version}/bin/linux/${arch}/kubectl`
|
||||||
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/%s/kubectl',
|
|
||||||
version,
|
|
||||||
arch
|
|
||||||
)
|
|
||||||
|
|
||||||
case 'Darwin':
|
case 'Darwin':
|
||||||
return util.format(
|
return `https://dl.k8s.io/release/${version}/bin/darwin/${arch}/kubectl`
|
||||||
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/darwin/%s/kubectl',
|
|
||||||
version,
|
|
||||||
arch
|
|
||||||
)
|
|
||||||
|
|
||||||
case 'Windows_NT':
|
case 'Windows_NT':
|
||||||
default:
|
default:
|
||||||
return util.format(
|
return `https://dl.k8s.io/release/${version}/bin/windows/${arch}/kubectl.exe`
|
||||||
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/windows/%s/kubectl.exe',
|
|
||||||
version,
|
|
||||||
arch
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ describe('Testing all functions in run file.', () => {
|
||||||
(arch) => {
|
(arch) => {
|
||||||
jest.spyOn(os, 'type').mockReturnValue('Linux')
|
jest.spyOn(os, 'type').mockReturnValue('Linux')
|
||||||
const kubectlLinuxUrl = util.format(
|
const kubectlLinuxUrl = util.format(
|
||||||
'https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/linux/%s/kubectl',
|
'https://dl.k8s.io/release/v1.15.0/bin/linux/%s/kubectl',
|
||||||
arch
|
arch
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ describe('Testing all functions in run file.', () => {
|
||||||
(arch) => {
|
(arch) => {
|
||||||
jest.spyOn(os, 'type').mockReturnValue('Darwin')
|
jest.spyOn(os, 'type').mockReturnValue('Darwin')
|
||||||
const kubectlDarwinUrl = util.format(
|
const kubectlDarwinUrl = util.format(
|
||||||
'https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/darwin/%s/kubectl',
|
'https://dl.k8s.io/release/v1.15.0/bin/darwin/%s/kubectl',
|
||||||
arch
|
arch
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ describe('Testing all functions in run file.', () => {
|
||||||
jest.spyOn(os, 'type').mockReturnValue('Windows_NT')
|
jest.spyOn(os, 'type').mockReturnValue('Windows_NT')
|
||||||
|
|
||||||
const kubectlWindowsUrl = util.format(
|
const kubectlWindowsUrl = util.format(
|
||||||
'https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/windows/%s/kubectl.exe',
|
'https://dl.k8s.io/release/v1.15.0/bin/windows/%s/kubectl.exe',
|
||||||
arch
|
arch
|
||||||
)
|
)
|
||||||
expect(getkubectlDownloadURL('v1.15.0', arch)).toBe(kubectlWindowsUrl)
|
expect(getkubectlDownloadURL('v1.15.0', arch)).toBe(kubectlWindowsUrl)
|
||||||
|
|
Loading…
Reference in a new issue