mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-23 20:27:02 +08:00
fix: Add override OS and linux default
This commit is contained in:
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@@ -5,7 +5,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest, khadas-vim3]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ inputs:
|
|||||||
override_tag:
|
override_tag:
|
||||||
description: 'Specify the git tag'
|
description: 'Specify the git tag'
|
||||||
required: false
|
required: false
|
||||||
|
os:
|
||||||
|
description: 'Override the assumed OS. Options are alpine | linux | macos | windows.'
|
||||||
|
required: false
|
||||||
root_dir:
|
root_dir:
|
||||||
description: 'Used when not in git/hg project to identify project root directory'
|
description: 'Used when not in git/hg project to identify project root directory'
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
69
dist/index.js
vendored
69
dist/index.js
vendored
@@ -1,7 +1,7 @@
|
|||||||
require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap
|
require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap
|
||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
/***/ 7351:
|
/***/ 5241:
|
||||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -135,7 +135,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
|
exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
|
||||||
const command_1 = __nccwpck_require__(7351);
|
const command_1 = __nccwpck_require__(5241);
|
||||||
const file_command_1 = __nccwpck_require__(717);
|
const file_command_1 = __nccwpck_require__(717);
|
||||||
const utils_1 = __nccwpck_require__(5278);
|
const utils_1 = __nccwpck_require__(5278);
|
||||||
const os = __importStar(__nccwpck_require__(2087));
|
const os = __importStar(__nccwpck_require__(2087));
|
||||||
@@ -626,7 +626,7 @@ const os = __importStar(__nccwpck_require__(2087));
|
|||||||
const events = __importStar(__nccwpck_require__(8614));
|
const events = __importStar(__nccwpck_require__(8614));
|
||||||
const child = __importStar(__nccwpck_require__(3129));
|
const child = __importStar(__nccwpck_require__(3129));
|
||||||
const path = __importStar(__nccwpck_require__(5622));
|
const path = __importStar(__nccwpck_require__(5622));
|
||||||
const io = __importStar(__nccwpck_require__(7436));
|
const io = __importStar(__nccwpck_require__(7351));
|
||||||
const ioUtil = __importStar(__nccwpck_require__(1962));
|
const ioUtil = __importStar(__nccwpck_require__(1962));
|
||||||
const timers_1 = __nccwpck_require__(8213);
|
const timers_1 = __nccwpck_require__(8213);
|
||||||
/* eslint-disable @typescript-eslint/unbound-method */
|
/* eslint-disable @typescript-eslint/unbound-method */
|
||||||
@@ -2221,7 +2221,7 @@ exports.getCmdPath = getCmdPath;
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 7436:
|
/***/ 7351:
|
||||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -12842,10 +12842,10 @@ var external_fs_ = __nccwpck_require__(5747);
|
|||||||
var external_https_ = __nccwpck_require__(7211);
|
var external_https_ = __nccwpck_require__(7211);
|
||||||
// EXTERNAL MODULE: external "path"
|
// EXTERNAL MODULE: external "path"
|
||||||
var external_path_ = __nccwpck_require__(5622);
|
var external_path_ = __nccwpck_require__(5622);
|
||||||
// EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js
|
|
||||||
var core = __nccwpck_require__(2186);
|
|
||||||
// EXTERNAL MODULE: ./node_modules/@actions/exec/lib/exec.js
|
// EXTERNAL MODULE: ./node_modules/@actions/exec/lib/exec.js
|
||||||
var exec = __nccwpck_require__(1514);
|
var exec = __nccwpck_require__(1514);
|
||||||
|
// EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js
|
||||||
|
var core = __nccwpck_require__(2186);
|
||||||
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js
|
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js
|
||||||
var github = __nccwpck_require__(5438);
|
var github = __nccwpck_require__(5438);
|
||||||
;// CONCATENATED MODULE: ./package.json
|
;// CONCATENATED MODULE: ./package.json
|
||||||
@@ -12874,6 +12874,7 @@ const buildExec = () => {
|
|||||||
const flags = core.getInput('flags');
|
const flags = core.getInput('flags');
|
||||||
const functionalities = core.getInput('functionalities');
|
const functionalities = core.getInput('functionalities');
|
||||||
const name = core.getInput('name');
|
const name = core.getInput('name');
|
||||||
|
const os = core.getInput('os');
|
||||||
const overrideBranch = core.getInput('override_branch');
|
const overrideBranch = core.getInput('override_branch');
|
||||||
const overrideBuild = core.getInput('override_build');
|
const overrideBuild = core.getInput('override_build');
|
||||||
const overrideCommit = core.getInput('override_commit');
|
const overrideCommit = core.getInput('override_commit');
|
||||||
@@ -12981,7 +12982,7 @@ const buildExec = () => {
|
|||||||
if (workingDir) {
|
if (workingDir) {
|
||||||
options.cwd = workingDir;
|
options.cwd = workingDir;
|
||||||
}
|
}
|
||||||
return { execArgs, options, failCi };
|
return { execArgs, options, failCi, os };
|
||||||
};
|
};
|
||||||
/* harmony default export */ const src_buildExec = (buildExec);
|
/* harmony default export */ const src_buildExec = (buildExec);
|
||||||
|
|
||||||
@@ -12994,24 +12995,37 @@ const setFailure = (message, failCi) => {
|
|||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const getUploaderName = () => {
|
const getUploaderName = (platform) => {
|
||||||
if (isWindows()) {
|
if (isWindows(platform)) {
|
||||||
return 'codecov.exe';
|
return 'codecov.exe';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 'codecov';
|
return 'codecov';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const isValidPlatform = () => {
|
const isValidPlatform = (platform) => {
|
||||||
return PLATFORMS.includes(getPlatform());
|
return PLATFORMS.includes(platform);
|
||||||
};
|
};
|
||||||
const isWindows = () => {
|
const isWindows = (platform) => {
|
||||||
return getPlatform() === 'windows';
|
return platform === 'windows';
|
||||||
};
|
};
|
||||||
const getPlatform = () => {
|
const getPlatform = (os) => {
|
||||||
return process.env.RUNNER_OS.toLowerCase();
|
var _a;
|
||||||
|
if (isValidPlatform(os)) {
|
||||||
|
core.info(`==> ${os} OS provided`);
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
const platform = (_a = process.env.RUNNER_OS) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
||||||
|
if (isValidPlatform(platform)) {
|
||||||
|
core.info(`==> ${platform} OS detected`);
|
||||||
|
return platform;
|
||||||
|
}
|
||||||
|
core.info('==> Could not detect OS or provided OS is invalid. Defaulting to linux');
|
||||||
|
return 'linux';
|
||||||
|
};
|
||||||
|
const getBaseUrl = (platform) => {
|
||||||
|
return `https://uploader.codecov.io/latest/${platform}/${getUploaderName(platform)}`;
|
||||||
};
|
};
|
||||||
const BASEURL = `https://uploader.codecov.io/latest/${getPlatform()}/${getUploaderName()}`;
|
|
||||||
|
|
||||||
|
|
||||||
// EXTERNAL MODULE: external "crypto"
|
// EXTERNAL MODULE: external "crypto"
|
||||||
@@ -13037,15 +13051,15 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
const verify = (filename) => __awaiter(void 0, void 0, void 0, function* () {
|
const verify = (filename, platform) => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
const uploaderName = getUploaderName();
|
const uploaderName = getUploaderName(platform);
|
||||||
// Read in public key
|
// Read in public key
|
||||||
const publicKeyArmored = yield external_fs_.readFileSync(__nccwpck_require__.ab + "pgp_keys.asc", 'utf-8');
|
const publicKeyArmored = yield external_fs_.readFileSync(__nccwpck_require__.ab + "pgp_keys.asc", 'utf-8');
|
||||||
// Get SHASUM and SHASUM signature files
|
// Get SHASUM and SHASUM signature files
|
||||||
const shasumRes = yield lib(`${BASEURL}.SHA256SUM`);
|
const shasumRes = yield lib(`${getBaseUrl(platform)}.SHA256SUM`);
|
||||||
const shasum = yield shasumRes.text();
|
const shasum = yield shasumRes.text();
|
||||||
const shaSigRes = yield lib(`${BASEURL}.SHA256SUM.sig`);
|
const shaSigRes = yield lib(`${getBaseUrl(platform)}.SHA256SUM.sig`);
|
||||||
const shaSig = yield shaSigRes.text();
|
const shaSig = yield shaSigRes.text();
|
||||||
// Verify shasum
|
// Verify shasum
|
||||||
const verified = yield openpgp_min/* verify */.T({
|
const verified = yield openpgp_min/* verify */.T({
|
||||||
@@ -13102,17 +13116,12 @@ var src_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argu
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let failCi;
|
let failCi;
|
||||||
try {
|
try {
|
||||||
const { execArgs, options, failCi } = src_buildExec();
|
const { execArgs, options, failCi, os } = src_buildExec();
|
||||||
const platform = getPlatform();
|
const platform = getPlatform(os);
|
||||||
core.info(`==> ${platform} OS detected`);
|
const filename = external_path_.join(__dirname, getUploaderName(platform));
|
||||||
if (!isValidPlatform()) {
|
external_https_.get(getBaseUrl(platform), (res) => {
|
||||||
setFailure(`Codecov: Encountered an unexpected platform: ${platform}`, failCi);
|
|
||||||
}
|
|
||||||
const filename = external_path_.join(__dirname, getUploaderName());
|
|
||||||
external_https_.get(BASEURL, (res) => {
|
|
||||||
// Image will be stored at this path
|
// Image will be stored at this path
|
||||||
const filePath = external_fs_.createWriteStream(filename);
|
const filePath = external_fs_.createWriteStream(filename);
|
||||||
res.pipe(filePath);
|
res.pipe(filePath);
|
||||||
@@ -13121,7 +13130,7 @@ try {
|
|||||||
setFailure(`Codecov: Failed to write uploader binary: ${err.message}`, true);
|
setFailure(`Codecov: Failed to write uploader binary: ${err.message}`, true);
|
||||||
}).on('finish', () => src_awaiter(void 0, void 0, void 0, function* () {
|
}).on('finish', () => src_awaiter(void 0, void 0, void 0, function* () {
|
||||||
filePath.close();
|
filePath.close();
|
||||||
yield validate(filename);
|
yield validate(filename, platform);
|
||||||
yield external_fs_.chmodSync(filename, '777');
|
yield external_fs_.chmodSync(filename, '777');
|
||||||
const unlink = () => {
|
const unlink = () => {
|
||||||
external_fs_.unlink(filename, (err) => {
|
external_fs_.unlink(filename, (err) => {
|
||||||
|
|||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -27,6 +27,7 @@ const buildExec = () => {
|
|||||||
const flags = core.getInput('flags');
|
const flags = core.getInput('flags');
|
||||||
const functionalities = core.getInput('functionalities');
|
const functionalities = core.getInput('functionalities');
|
||||||
const name = core.getInput('name');
|
const name = core.getInput('name');
|
||||||
|
const os = core.getInput('os');
|
||||||
const overrideBranch = core.getInput('override_branch');
|
const overrideBranch = core.getInput('override_branch');
|
||||||
const overrideBuild = core.getInput('override_build');
|
const overrideBuild = core.getInput('override_build');
|
||||||
const overrideCommit = core.getInput('override_commit');
|
const overrideCommit = core.getInput('override_commit');
|
||||||
@@ -146,7 +147,7 @@ const buildExec = () => {
|
|||||||
options.cwd = workingDir;
|
options.cwd = workingDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {execArgs, options, failCi};
|
return {execArgs, options, failCi, os};
|
||||||
};
|
};
|
||||||
|
|
||||||
export default buildExec;
|
export default buildExec;
|
||||||
|
|||||||
61
src/helpers.test.ts
Normal file
61
src/helpers.test.ts
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
import {
|
||||||
|
getBaseUrl,
|
||||||
|
getPlatform,
|
||||||
|
isValidPlatform,
|
||||||
|
isWindows,
|
||||||
|
PLATFORMS,
|
||||||
|
} from './helpers';
|
||||||
|
|
||||||
|
let OLDOS = process.env.RUNNER_OS;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
jest.resetModules();
|
||||||
|
OLDOS = process.env.RUNNER_OS;
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(() => {
|
||||||
|
process.env.RUNNER_OS = OLDOS;
|
||||||
|
});
|
||||||
|
|
||||||
|
test('getPlatform', () => {
|
||||||
|
expect(getPlatform('linux')).toBe('linux');
|
||||||
|
expect(getPlatform('windows')).toBe('windows');
|
||||||
|
|
||||||
|
const defaultPlatform =
|
||||||
|
process.env.RUNNER_OS ? process.env.RUNNER_OS.toLowerCase() : 'linux';
|
||||||
|
expect(getPlatform('fakeos')).toBe(defaultPlatform);
|
||||||
|
expect(getPlatform()).toBe(defaultPlatform);
|
||||||
|
|
||||||
|
process.env.RUNNER_OS = 'macos';
|
||||||
|
expect(getPlatform('fakeos')).toBe('macos');
|
||||||
|
expect(getPlatform()).toBe('macos');
|
||||||
|
|
||||||
|
process.env.RUNNER_OS = 'alsofakeos';
|
||||||
|
expect(getPlatform()).toBe('linux');
|
||||||
|
expect(getPlatform('fakeos')).toBe('linux');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('getBaseUrl', () => {
|
||||||
|
expect(PLATFORMS.map((platform) => {
|
||||||
|
return getBaseUrl(platform);
|
||||||
|
})).toEqual([
|
||||||
|
'https://uploader.codecov.io/latest/alpine/codecov',
|
||||||
|
'https://uploader.codecov.io/latest/linux/codecov',
|
||||||
|
'https://uploader.codecov.io/latest/macos/codecov',
|
||||||
|
'https://uploader.codecov.io/latest/windows/codecov.exe',
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('isWindows', () => {
|
||||||
|
expect(PLATFORMS.map((platform) => {
|
||||||
|
return isWindows(platform);
|
||||||
|
})).toEqual([false, false, false, true]);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('isValidPlatform', () => {
|
||||||
|
expect(PLATFORMS.map((platform) => {
|
||||||
|
return isValidPlatform(platform);
|
||||||
|
})).toEqual([true, true, true, true]);
|
||||||
|
|
||||||
|
expect(isValidPlatform('fakeos')).toBeFalsy();
|
||||||
|
});
|
||||||
@@ -9,30 +9,47 @@ const setFailure = (message: string, failCi: boolean): void => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getUploaderName = (): string => {
|
const getUploaderName = (platform: string): string => {
|
||||||
if (isWindows()) {
|
if (isWindows(platform)) {
|
||||||
return 'codecov.exe';
|
return 'codecov.exe';
|
||||||
} else {
|
} else {
|
||||||
return 'codecov';
|
return 'codecov';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const isValidPlatform = (): boolean => {
|
const isValidPlatform = (platform: string): boolean => {
|
||||||
return PLATFORMS.includes(getPlatform());
|
return PLATFORMS.includes(platform);
|
||||||
};
|
};
|
||||||
|
|
||||||
const isWindows = (): boolean => {
|
const isWindows = (platform: string): boolean => {
|
||||||
return getPlatform() === 'windows';
|
return platform === 'windows';
|
||||||
};
|
};
|
||||||
|
|
||||||
const getPlatform = (): string => {
|
const getPlatform = (os?: string): string => {
|
||||||
return process.env.RUNNER_OS.toLowerCase();
|
if (isValidPlatform(os)) {
|
||||||
|
core.info(`==> ${os} OS provided`);
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
|
const platform = process.env.RUNNER_OS?.toLowerCase();
|
||||||
|
if (isValidPlatform(platform)) {
|
||||||
|
core.info(`==> ${platform} OS detected`);
|
||||||
|
return platform;
|
||||||
|
}
|
||||||
|
|
||||||
|
core.info(
|
||||||
|
'==> Could not detect OS or provided OS is invalid. Defaulting to linux',
|
||||||
|
);
|
||||||
|
return 'linux';
|
||||||
};
|
};
|
||||||
|
|
||||||
const BASEURL = `https://uploader.codecov.io/latest/${getPlatform()}/${getUploaderName()}`;
|
const getBaseUrl = (platform: string): string => {
|
||||||
|
return `https://uploader.codecov.io/latest/${platform}/${getUploaderName(platform)}`;
|
||||||
|
};
|
||||||
|
|
||||||
export {
|
export {
|
||||||
BASEURL,
|
PLATFORMS,
|
||||||
|
getBaseUrl,
|
||||||
getPlatform,
|
getPlatform,
|
||||||
getUploaderName,
|
getUploaderName,
|
||||||
isValidPlatform,
|
isValidPlatform,
|
||||||
|
|||||||
21
src/index.ts
21
src/index.ts
@@ -2,15 +2,13 @@ import * as fs from 'fs';
|
|||||||
import * as https from 'https';
|
import * as https from 'https';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
import * as core from '@actions/core';
|
|
||||||
import * as exec from '@actions/exec';
|
import * as exec from '@actions/exec';
|
||||||
|
|
||||||
import buildExec from './buildExec';
|
import buildExec from './buildExec';
|
||||||
import {
|
import {
|
||||||
BASEURL,
|
getBaseUrl,
|
||||||
getPlatform,
|
getPlatform,
|
||||||
getUploaderName,
|
getUploaderName,
|
||||||
isValidPlatform,
|
|
||||||
setFailure,
|
setFailure,
|
||||||
} from './helpers';
|
} from './helpers';
|
||||||
|
|
||||||
@@ -19,18 +17,11 @@ import verify from './validate';
|
|||||||
let failCi;
|
let failCi;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const {execArgs, options, failCi} = buildExec();
|
const {execArgs, options, failCi, os} = buildExec();
|
||||||
const platform = getPlatform();
|
const platform = getPlatform(os);
|
||||||
core.info(`==> ${platform} OS detected`);
|
|
||||||
|
|
||||||
if (!isValidPlatform()) {
|
const filename = path.join( __dirname, getUploaderName(platform));
|
||||||
setFailure(
|
https.get(getBaseUrl(platform), (res) => {
|
||||||
`Codecov: Encountered an unexpected platform: ${platform}`,
|
|
||||||
failCi,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
const filename = path.join( __dirname, getUploaderName());
|
|
||||||
https.get(BASEURL, (res) => {
|
|
||||||
// Image will be stored at this path
|
// Image will be stored at this path
|
||||||
const filePath = fs.createWriteStream(filename);
|
const filePath = fs.createWriteStream(filename);
|
||||||
res.pipe(filePath);
|
res.pipe(filePath);
|
||||||
@@ -43,7 +34,7 @@ try {
|
|||||||
}).on('finish', async () => {
|
}).on('finish', async () => {
|
||||||
filePath.close();
|
filePath.close();
|
||||||
|
|
||||||
await verify(filename);
|
await verify(filename, platform);
|
||||||
await fs.chmodSync(filename, '777');
|
await fs.chmodSync(filename, '777');
|
||||||
|
|
||||||
const unlink = () => {
|
const unlink = () => {
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ import * as openpgp from 'openpgp';
|
|||||||
import * as fetch from 'node-fetch';
|
import * as fetch from 'node-fetch';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
BASEURL,
|
getBaseUrl,
|
||||||
getUploaderName,
|
getUploaderName,
|
||||||
setFailure,
|
setFailure,
|
||||||
} from './helpers';
|
} from './helpers';
|
||||||
|
|
||||||
const verify = async (filename: string) => {
|
const verify = async (filename: string, platform: string) => {
|
||||||
try {
|
try {
|
||||||
const uploaderName = getUploaderName();
|
const uploaderName = getUploaderName(platform);
|
||||||
|
|
||||||
// Read in public key
|
// Read in public key
|
||||||
const publicKeyArmored = await fs.readFileSync(
|
const publicKeyArmored = await fs.readFileSync(
|
||||||
@@ -23,10 +23,10 @@ const verify = async (filename: string) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Get SHASUM and SHASUM signature files
|
// Get SHASUM and SHASUM signature files
|
||||||
const shasumRes = await fetch( `${BASEURL}.SHA256SUM`);
|
const shasumRes = await fetch( `${getBaseUrl(platform)}.SHA256SUM`);
|
||||||
const shasum = await shasumRes.text();
|
const shasum = await shasumRes.text();
|
||||||
|
|
||||||
const shaSigRes = await fetch( `${BASEURL}.SHA256SUM.sig`);
|
const shaSigRes = await fetch( `${getBaseUrl(platform)}.SHA256SUM.sig`);
|
||||||
const shaSig = await shaSigRes.text();
|
const shaSig = await shaSigRes.text();
|
||||||
|
|
||||||
// Verify shasum
|
// Verify shasum
|
||||||
|
|||||||
Reference in New Issue
Block a user