mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 19:26:33 +00:00
patch: rebuild mountutils in forge.sidecar
This commit is contained in:
parent
f6160df454
commit
587701e9ab
@ -59,7 +59,7 @@ function build(
|
|||||||
binDir: string,
|
binDir: string,
|
||||||
binName: string,
|
binName: string,
|
||||||
) {
|
) {
|
||||||
const commands: Array<[string, string[]]> = [
|
const commands: Array<[string, string[], object?]> = [
|
||||||
[
|
[
|
||||||
'tsc',
|
'tsc',
|
||||||
['--project', 'tsconfig.sidecar.json', '--outDir', `${sourcesDir}`],
|
['--project', 'tsconfig.sidecar.json', '--outDir', `${sourcesDir}`],
|
||||||
@ -73,7 +73,10 @@ function build(
|
|||||||
path.resolve(binDir, binName)
|
path.resolve(binDir, binName)
|
||||||
: // otherwise build in arch-specific directory within binDir
|
: // otherwise build in arch-specific directory within binDir
|
||||||
path.resolve(binDir, arch, binName);
|
path.resolve(binDir, arch, binName);
|
||||||
|
|
||||||
|
// FIXME: rebuilding mountutils shouldn't be necessary, but it is. It's comming from etcher-sdk a fix has been upstreamed but to use the latest etcher-sdk we need to upgrade axios at the same time)
|
||||||
|
commands.push(['npm', ['run', 'rebuild'], { cwd: 'node_modules/mountutils' }])
|
||||||
|
|
||||||
commands.push([
|
commands.push([
|
||||||
'pkg',
|
'pkg',
|
||||||
[
|
[
|
||||||
@ -86,8 +89,8 @@ function build(
|
|||||||
'--public-packages',
|
'--public-packages',
|
||||||
'"*"',
|
'"*"',
|
||||||
// always build for host platform and node version
|
// always build for host platform and node version
|
||||||
'--target',
|
// https://github.com/vercel/pkg-fetch/releases
|
||||||
arch,
|
`--target node18-${arch}`,
|
||||||
'--output',
|
'--output',
|
||||||
`${binPath}`,
|
`${binPath}`,
|
||||||
],
|
],
|
||||||
@ -96,10 +99,10 @@ function build(
|
|||||||
//commands.push(['ls', ['-alFR', `'${binDir}'`]]);
|
//commands.push(['ls', ['-alFR', `'${binDir}'`]]);
|
||||||
});
|
});
|
||||||
|
|
||||||
commands.forEach(([cmd, args]) => {
|
commands.forEach(([cmd, args, opt]) => {
|
||||||
debug('running command:', cmd, args.join(' '));
|
debug('running command:', cmd, args.join(' '));
|
||||||
try {
|
try {
|
||||||
execFileSync(cmd, args, { shell: true, stdio: 'inherit' });
|
execFileSync(cmd, args, { shell: true, stdio: 'inherit', ...opt });
|
||||||
} catch (error) {console.log(error)}
|
} catch (error) {console.log(error)}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
1
npm-shrinkwrap.json
generated
1
npm-shrinkwrap.json
generated
@ -7,6 +7,7 @@
|
|||||||
"": {
|
"": {
|
||||||
"name": "balena-etcher",
|
"name": "balena-etcher",
|
||||||
"version": "1.18.13",
|
"version": "1.18.13",
|
||||||
|
"hasInstallScript": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@balena/sudo-prompt": "9.2.1-workaround-windows-amperstand-in-username-0849e215b947987a643fe5763902aea201255534",
|
"@balena/sudo-prompt": "9.2.1-workaround-windows-amperstand-in-username-0849e215b947987a643fe5763902aea201255534",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user