1
0
mirror of https://github.com/lumehq/lume.git synced 2025-03-21 07:11:46 +01:00

25 lines
537 B
JavaScript
Raw Permalink Normal View History

2023-12-15 09:15:30 +07:00
const fs = require('fs')
let extension = ''
if (process.platform === 'win32') {
extension = '.exe'
}
async function main() {
const host = Bun.spawn(["rustc", '-vV']);
const stdoutStr = await new Response(host.stdout).text();
const targetTriple = /host: (\S+)/g.exec(stdoutStr)[1]
if (!targetTriple) {
console.error('Failed to determine platform target triple')
}
fs.renameSync(
`src-tauri/bins/depot${extension}`,
`src-tauri/bins/depot-${targetTriple}${extension}`,
)
}
main().catch((e) => {
throw e
})