generated from actions/javascript-action
-
Notifications
You must be signed in to change notification settings - Fork 3
/
cleanup.js
31 lines (25 loc) · 872 Bytes
/
cleanup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const core = require('@actions/core');
const exec = require('@actions/exec');
const io = require('@actions/io');
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);
}
}
}
}
cleanup();