Skip to content

Commit

Permalink
Merge pull request #177 from blinemedical/VIDEO-2688-fix-script-issues
Browse files Browse the repository at this point in the history
[VIDEO-2688] - Script fixes for the ovedrridden url testing
  • Loading branch information
lyramcmillan authored Mar 19, 2024
2 parents 1590980 + d865dd9 commit 66f86f8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 48 deletions.
25 changes: 2 additions & 23 deletions dist/main/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/main/index.js.map

Large diffs are not rendered by default.

25 changes: 2 additions & 23 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async function run() {

if (msiUrl) {
core.info(`Downloading: ${msiUrl}`);
const msiInstallerPath = await tc.downloadTool(msiUrl, installer[0]);
const msiInstallerPath = await tc.downloadTool(msiUrl, installers[0]);

if (msiInstallerPath) {
await exec.exec('msiexec', [
Expand All @@ -108,13 +108,12 @@ async function run() {
'/i',
msiInstallerPath,
]);
await io.rmRF(msiInstallerPath);
} else {
core.setFailed(`Failed to download ${msiUrl}`);
}

core.info(`Downloading: ${devMsiUrl}`);
const devMsiInstallerPath = await tc.downloadTool(devMsiUrl, installer[1]);
const devMsiInstallerPath = await tc.downloadTool(devMsiUrl, installers[1]);

if (devMsiInstallerPath) {
await exec.exec('msiexec', [
Expand Down Expand Up @@ -316,24 +315,4 @@ async function run() {
}
}

async function cleanup() {
const arch = core.getInput('arch');
const version = core.getInput('version');

const installers = [
`gstreamer-1.0-msvc-${arch}-${version}.msi`,
`gstreamer-1.0-devel-msvc-${arch}-${version}.msi`,
];

for (const installer of installers) {
await exec.exec('msiexec', [
'/passive',
'/uninstall',
installer,
]);

await io.rmRF(installer);
}
}

run();
3 changes: 2 additions & 1 deletion index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ const path = require('path');

// shows how the runner will run a javascript action with env / stdout protocol
test('test runs', () => {
process.env['INPUT_VERSION'] = '1.22.9';
process.env['INPUT_VERSION'] = '1.22.10';
process.env['INPUT_ARCH'] = 'x86_64';
process.env['INPUT_FORCEBUILDFROMSOURCE'] = 'false';
process.env['INPUT_MSIURL'] = null;

const ip = path.join(__dirname, 'index.js');
if (process.platform === 'linux') {
// Linux uses caching, so until there's a way to mock around @actions/cache,
Expand Down

0 comments on commit 66f86f8

Please sign in to comment.