Skip to content

Commit 901a10e

Browse files
github-actions[bot]dependabot[bot]Vidya2606Vidya ReddyOliverMKing
authored
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](chalk/ansi-regex@v5.0.0...v5.0.1) --- updated-dependencies: - dependency-name: ansi-regex dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> 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 <[email protected]> * Upgraded the ncc version (#61) Co-authored-by: Vidya Reddy <[email protected]> * 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] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> 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](SamVerschueren/decode-uri-component@v0.2.0...v0.2.2) --- updated-dependencies: - dependency-name: decode-uri-component dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> 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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Vidya Reddy <[email protected]> Co-authored-by: Vidya Reddy <[email protected]> Co-authored-by: Oliver King <[email protected]> Co-authored-by: Asa Gayle <[email protected]> Co-authored-by: Sumner Warren <[email protected]> Co-authored-by: Oliver King <[email protected]>
1 parent e1be5e7 commit 901a10e

File tree

4 files changed

+15
-28
lines changed

4 files changed

+15
-28
lines changed

lib/index.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -7157,7 +7157,6 @@ module.exports = v4;
71577157
Object.defineProperty(exports, "__esModule", ({ value: true }));
71587158
exports.getExecutableExtension = exports.getkubectlDownloadURL = exports.getKubectlArch = void 0;
71597159
const os = __nccwpck_require__(2037);
7160-
const util = __nccwpck_require__(3837);
71617160
function getKubectlArch() {
71627161
const arch = os.arch();
71637162
if (arch === 'x64') {
@@ -7169,12 +7168,12 @@ exports.getKubectlArch = getKubectlArch;
71697168
function getkubectlDownloadURL(version, arch) {
71707169
switch (os.type()) {
71717170
case 'Linux':
7172-
return util.format('https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/%s/kubectl', version, arch);
7171+
return `https://dl.k8s.io/release/${version}/bin/linux/${arch}/kubectl`;
71737172
case 'Darwin':
7174-
return util.format('https://storage.googleapis.com/kubernetes-release/release/%s/bin/darwin/%s/kubectl', version, arch);
7173+
return `https://dl.k8s.io/release/${version}/bin/darwin/${arch}/kubectl`;
71757174
case 'Windows_NT':
71767175
default:
7177-
return util.format('https://storage.googleapis.com/kubernetes-release/release/%s/bin/windows/%s/kubectl.exe', version, arch);
7176+
return `https://dl.k8s.io/release/${version}/bin/windows/${arch}/kubectl.exe`;
71787177
}
71797178
}
71807179
exports.getkubectlDownloadURL = getkubectlDownloadURL;

package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/helpers.ts

+3-15
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,14 @@ export function getKubectlArch(): string {
1212
export function getkubectlDownloadURL(version: string, arch: string): string {
1313
switch (os.type()) {
1414
case 'Linux':
15-
return util.format(
16-
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/%s/kubectl',
17-
version,
18-
arch
19-
)
15+
return `https://dl.k8s.io/release/${version}/bin/linux/${arch}/kubectl`
2016

2117
case 'Darwin':
22-
return util.format(
23-
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/darwin/%s/kubectl',
24-
version,
25-
arch
26-
)
18+
return `https://dl.k8s.io/release/${version}/bin/darwin/${arch}/kubectl`
2719

2820
case 'Windows_NT':
2921
default:
30-
return util.format(
31-
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/windows/%s/kubectl.exe',
32-
version,
33-
arch
34-
)
22+
return `https://dl.k8s.io/release/${version}/bin/windows/${arch}/kubectl.exe`
3523
}
3624
}
3725

src/run.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe('Testing all functions in run file.', () => {
4545
(arch) => {
4646
jest.spyOn(os, 'type').mockReturnValue('Linux')
4747
const kubectlLinuxUrl = util.format(
48-
'https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/linux/%s/kubectl',
48+
'https://dl.k8s.io/release/v1.15.0/bin/linux/%s/kubectl',
4949
arch
5050
)
5151

@@ -59,7 +59,7 @@ describe('Testing all functions in run file.', () => {
5959
(arch) => {
6060
jest.spyOn(os, 'type').mockReturnValue('Darwin')
6161
const kubectlDarwinUrl = util.format(
62-
'https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/darwin/%s/kubectl',
62+
'https://dl.k8s.io/release/v1.15.0/bin/darwin/%s/kubectl',
6363
arch
6464
)
6565

@@ -74,7 +74,7 @@ describe('Testing all functions in run file.', () => {
7474
jest.spyOn(os, 'type').mockReturnValue('Windows_NT')
7575

7676
const kubectlWindowsUrl = util.format(
77-
'https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/windows/%s/kubectl.exe',
77+
'https://dl.k8s.io/release/v1.15.0/bin/windows/%s/kubectl.exe',
7878
arch
7979
)
8080
expect(getkubectlDownloadURL('v1.15.0', arch)).toBe(kubectlWindowsUrl)

0 commit comments

Comments
 (0)