Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VIDEO-2688] - Script fixes for the ovedrridden url testing #177

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading