@@ -76,14 +76,27 @@ exports.refreshKeys = exports.verify = exports.setupKeys = void 0;
7676const exec_1 = __nccwpck_require__(1514);
7777const core = __importStar(__nccwpck_require__(2186));
7878const toolCache = __importStar(__nccwpck_require__(7784));
79- async function setupKeys() {
79+ const os_1 = __nccwpck_require__(1855);
80+ async function setupKeys(system) {
8081 core.debug("Fetching verification keys");
8182 let path = await toolCache.downloadTool("https://swift.org/keys/all-keys.asc");
82- core.debug("Examining verification keys");
83- await (0, exec_1.exec)(`file "${path}"`);
84- const isPlaintext = await (0, exec_1.exec)(`gunzip --test "${path}"`, undefined, { silent: true, ignoreReturnCode: true });
85- core.debug("Importing verification keys");
86- await (0, exec_1.exec)('bash', ['-c', `${isPlaintext ? "cat" : "zcat"} "${path}" | gpg --import`]);
83+ if (system.os === os_1.OS.Ubuntu || system.os === os_1.OS.MacOS) {
84+ core.debug("Examining verification keys");
85+ await (0, exec_1.exec)(`file "${path}"`);
86+ const isPlaintext = await (0, exec_1.exec)(`gunzip --test "${path}"`, undefined, {
87+ silent: true,
88+ ignoreReturnCode: true,
89+ });
90+ core.debug("Importing verification keys");
91+ await (0, exec_1.exec)("bash", [
92+ "-c",
93+ `${isPlaintext ? "cat" : "zcat"} "${path}" | gpg --import`,
94+ ]);
95+ }
96+ if (system.os === os_1.OS.Windows) {
97+ core.debug("Importing verification keys");
98+ await (0, exec_1.exec)(`gpg --import "${path}"`);
99+ }
87100 core.debug("Refreshing keys");
88101 await refreshKeys();
89102}
@@ -168,7 +181,7 @@ async function install(version, system) {
168181 let swiftPath = toolCache.find(`swift-${system.name}`, version);
169182 if (swiftPath === null || swiftPath.trim().length == 0) {
170183 core.debug(`No matching installation found`);
171- await (0, gpg_1.setupKeys)();
184+ await (0, gpg_1.setupKeys)(system );
172185 const swiftPkg = (0, swift_versions_1.swiftPackage)(version, system);
173186 let { pkg, signature } = await download(swiftPkg);
174187 await (0, gpg_1.verify)(signature, pkg);
@@ -463,7 +476,12 @@ const semver = __importStar(__nccwpck_require__(1383));
463476const core = __importStar(__nccwpck_require__(2186));
464477const os_1 = __nccwpck_require__(1855);
465478const VERSIONS_LIST = [
466- ["6.1.0", [os_1.OS.MacOS, os_1.OS.Ubuntu]],
479+ ["6.2.1", [os_1.OS.MacOS, os_1.OS.Ubuntu]],
480+ ["6.2", [os_1.OS.MacOS, os_1.OS.Ubuntu]],
481+ ["6.1.3", [os_1.OS.MacOS, os_1.OS.Ubuntu]],
482+ ["6.1.2", [os_1.OS.MacOS, os_1.OS.Ubuntu]],
483+ ["6.1.1", [os_1.OS.MacOS, os_1.OS.Ubuntu]],
484+ ["6.1", [os_1.OS.MacOS, os_1.OS.Ubuntu]],
467485 ["6.0.3", [os_1.OS.MacOS, os_1.OS.Ubuntu]],
468486 ["6.0.2", [os_1.OS.MacOS, os_1.OS.Ubuntu]],
469487 ["6.0.1", [os_1.OS.MacOS, os_1.OS.Ubuntu]],
@@ -793,7 +811,7 @@ const toolCache = __importStar(__nccwpck_require__(7784));
793811const path = __importStar(__nccwpck_require__(1017));
794812const exec_1 = __nccwpck_require__(1514);
795813const swift_versions_1 = __nccwpck_require__(8263);
796- const gpg_1 = __nccwpck_require__(9060) ;
814+ //import { setupKeys, verify } from "./gpg" ;
797815const visual_studio_1 = __nccwpck_require__(5219);
798816async function install(version, system) {
799817 if (os.platform() !== "win32") {
@@ -804,9 +822,9 @@ async function install(version, system) {
804822 let swiftPath = toolCache.find(`swift-${system.name}`, version);
805823 if (swiftPath === null || swiftPath.trim().length == 0) {
806824 core.debug(`No cached installer found`);
807- await (0, gpg_1. setupKeys)( );
825+ // await setupKeys(system );
808826 let { exe, signature } = await download(swiftPkg);
809- await (0, gpg_1. verify) (signature, exe);
827+ // await verify(signature, exe);
810828 const exePath = await toolCache.cacheFile(exe, swiftPkg.name, `swift-${system.name}`, version);
811829 swiftPath = path.join(exePath, swiftPkg.name);
812830 }
0 commit comments