forked from 7sharp9/edge-fs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.js
25 lines (19 loc) · 884 Bytes
/
build.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
const spawn = require('child_process').spawn;
const path = require('path')
const fs = require('fs');
spawn('dotnet', ['restore', 'EdgeFs.sln'], { stdio: 'inherit', cwd: path.resolve(__dirname) })
.on('close', function(code, signal) {
if (code === 0) {
spawn('dotnet', ['build', 'EdgeFs.sln', '--configuration', 'Release'], { stdio: 'inherit', cwd: path.resolve(__dirname) })
.on('close', function(code, signal) {
if (code === 0) {
copy();
}
})
}
});
function copy() {
fs.copyFileSync('src/edge-fs/bin/Release/edge-fs.dll', 'lib/edge-fs.dll')
fs.copyFileSync('src/edge-fs-coreclr/bin/Release/edge-fs-coreclr.dll', 'lib/edge-fs-coreclr.dll')
fs.copyFileSync('src/edge-fs-coreclr/bin/Release/edge-fs-coreclr.deps.json', 'lib/edge-fs-coreclr.deps.json')
}