Skip to content

Commit

Permalink
[VIDEO-2688] - Correctly implemented cleanup action for custom MSI ur…
Browse files Browse the repository at this point in the history
…l installs
  • Loading branch information
lyramcmillan committed Mar 14, 2024
1 parent c9c721c commit 1599de9
Show file tree
Hide file tree
Showing 14 changed files with 27,595 additions and 34 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ jobs:
with:
python-version: '3.x'

- name: Install Meson and Ninja Dependencies for Windows
if: matrix.os == 'windows-2019' || matrix.os == 'windows-2022'
run: pip install setuptools meson ninja

- name: Setup GStreamer with default version
uses: ./
with:
Expand Down
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ outputs:
description: 'Installation path'
runs:
using: 'node20'
main: 'dist/index.js'
main: 'dist/main/index.js'
post: 'dist/post/index.js'
28 changes: 28 additions & 0 deletions cleanup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const core = require('@actions/core');
const exec = require('@actions/exec');

async function cleanup() {
if (process.platform === 'win32') {
const msiUrl = core.getInput('msiUrl');

if (msiUrl) {

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',
'/x',
installer,
]);
await io.rmRF(installer);
}
}
}
}
1 change: 0 additions & 1 deletion dist/index.js.map

This file was deleted.

15 changes: 1 addition & 14 deletions dist/index.js → dist/main/index.js

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

1 change: 1 addition & 0 deletions dist/main/index.js.map

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 1599de9

Please sign in to comment.