Skip to content

Commit 5ed1e69

Browse files
committed
platform testing
1 parent d86c022 commit 5ed1e69

2 files changed

Lines changed: 5 additions & 124 deletions

File tree

dist/index.js

Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -6724,11 +6724,10 @@ async function downloadCLI(osPlatform){
67246724
case 'win32':
67256725
return await tc.extractZip(await tc.downloadTool(url));
67266726
case 'darwin':
6727-
// let tmpPath = await tc.extractXar(await tc.downloadTool(url));
6728-
let tmpPath = await tc.downloadTool(url);
6727+
let tmpPath = await tc.extractXar(await tc.downloadTool(url));
67296728
core.info(`extracting mac pkg in ${tmpPath}...`);
67306729
const installPath = '/Users/runner/work/_temp/stackql';
6731-
execSync(`pkgutil --expand ${tmpPath} ${installPath}`);
6730+
execSync(`pkgutil --expand-full ${tmpPath} ${installPath}`);
67326731
return installPath;
67336732
case 'linux':
67346733
return await tc.extractZip(await tc.downloadTool(url));
@@ -6799,65 +6798,6 @@ async function setup() {
67996798
core.setFailed(error.message);
68006799
}
68016800
})();
6802-
6803-
6804-
// const io = require('@actions/io');
6805-
// const core = require('@actions/core');
6806-
// const tc = require('@actions/tool-cache');
6807-
6808-
// const urls = {
6809-
// 'linux': 'https://releases.stackql.io/stackql/latest/stackql_linux_amd64.zip',
6810-
// 'darwin': 'https://storage.googleapis.com/stackql-public-releases/latest/stackql_darwin_multiarch.pkg',
6811-
// 'win32': 'https://releases.stackql.io/stackql/latest/stackql_windows_amd64.zip',
6812-
// }
6813-
6814-
6815-
// async function installWrapper(cliPath) {
6816-
// let source, target;
6817-
6818-
// // If we're on Windows, then the executable ends with .exe
6819-
// const exeSuffix = os.platform().startsWith('win') ? '.exe' : '';
6820-
6821-
// // Rename stackql(.exe) to stackql-bin(.exe)
6822-
// try {
6823-
// source = [cliPath, `stackql${exeSuffix}`].join(path.sep);
6824-
// target = [cliPath, `stackql-bin${exeSuffix}`].join(path.sep);
6825-
// core.debug(`Moving ${source} to ${target}.`);
6826-
// await io.mv(source, target);
6827-
// } catch (e) {
6828-
// core.debug(`Unable to move ${source} to ${target}.`);
6829-
// throw e;
6830-
// }
6831-
6832-
// // Install our wrapper as stackql by moving the wrapped executable to stackql
6833-
// try {
6834-
// source = path.resolve([__dirname, '..', 'wrapper', 'dist', 'index.js'].join(path.sep));
6835-
// target = [cliPath, 'stackql'].join(path.sep);
6836-
// core.debug(`Copying ${source} to ${target}.`);
6837-
// await io.cp(source, target);
6838-
// } catch (e) {
6839-
// core.error(`Unable to copy ${source} to ${target}.`);
6840-
// throw e;
6841-
// }
6842-
6843-
// // Export a new environment variable, so our wrapper can locate the binary
6844-
// core.exportVariable('STACKQL_CLI_PATH', cliPath);
6845-
// }
6846-
6847-
6848-
// async function setup(){
6849-
6850-
6851-
// const wrapper = core.getInput('use_wrapper') === 'true';
6852-
// if(wrapper){
6853-
// core.debug('installing wrapper')
6854-
// await installWrapper(cliPath)
6855-
// }
6856-
//
6857-
6858-
// }
6859-
6860-
68616801
})();
68626802

68636803
module.exports = __webpack_exports__;

index.js

Lines changed: 3 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ async function downloadCLI(osPlatform){
2222
case 'win32':
2323
return await tc.extractZip(await tc.downloadTool(url));
2424
case 'darwin':
25-
// let tmpPath = await tc.extractXar(await tc.downloadTool(url));
26-
let tmpPath = await tc.downloadTool(url);
25+
let tmpPath = await tc.extractXar(await tc.downloadTool(url));
2726
core.info(`extracting mac pkg in ${tmpPath}...`);
2827
const installPath = '/Users/runner/work/_temp/stackql';
29-
execSync(`pkgutil --expand ${tmpPath} ${installPath}`);
28+
execSync(`pkgutil --expand-full ${tmpPath} ${installPath}`);
3029
return installPath;
3130
case 'linux':
3231
return await tc.extractZip(await tc.downloadTool(url));
@@ -96,62 +95,4 @@ async function setup() {
9695
} catch (error) {
9796
core.setFailed(error.message);
9897
}
99-
})();
100-
101-
102-
// const io = require('@actions/io');
103-
// const core = require('@actions/core');
104-
// const tc = require('@actions/tool-cache');
105-
106-
// const urls = {
107-
// 'linux': 'https://releases.stackql.io/stackql/latest/stackql_linux_amd64.zip',
108-
// 'darwin': 'https://storage.googleapis.com/stackql-public-releases/latest/stackql_darwin_multiarch.pkg',
109-
// 'win32': 'https://releases.stackql.io/stackql/latest/stackql_windows_amd64.zip',
110-
// }
111-
112-
113-
// async function installWrapper(cliPath) {
114-
// let source, target;
115-
116-
// // If we're on Windows, then the executable ends with .exe
117-
// const exeSuffix = os.platform().startsWith('win') ? '.exe' : '';
118-
119-
// // Rename stackql(.exe) to stackql-bin(.exe)
120-
// try {
121-
// source = [cliPath, `stackql${exeSuffix}`].join(path.sep);
122-
// target = [cliPath, `stackql-bin${exeSuffix}`].join(path.sep);
123-
// core.debug(`Moving ${source} to ${target}.`);
124-
// await io.mv(source, target);
125-
// } catch (e) {
126-
// core.debug(`Unable to move ${source} to ${target}.`);
127-
// throw e;
128-
// }
129-
130-
// // Install our wrapper as stackql by moving the wrapped executable to stackql
131-
// try {
132-
// source = path.resolve([__dirname, '..', 'wrapper', 'dist', 'index.js'].join(path.sep));
133-
// target = [cliPath, 'stackql'].join(path.sep);
134-
// core.debug(`Copying ${source} to ${target}.`);
135-
// await io.cp(source, target);
136-
// } catch (e) {
137-
// core.error(`Unable to copy ${source} to ${target}.`);
138-
// throw e;
139-
// }
140-
141-
// // Export a new environment variable, so our wrapper can locate the binary
142-
// core.exportVariable('STACKQL_CLI_PATH', cliPath);
143-
// }
144-
145-
146-
// async function setup(){
147-
148-
149-
// const wrapper = core.getInput('use_wrapper') === 'true';
150-
// if(wrapper){
151-
// core.debug('installing wrapper')
152-
// await installWrapper(cliPath)
153-
// }
154-
//
155-
156-
// }
157-
98+
})();

0 commit comments

Comments
 (0)