wip fix
This commit is contained in:
parent
994ba5e608
commit
0b799c24b0
|
|
@ -1,13 +1,11 @@
|
||||||
import { $ } from "execa";
|
import { $ } from "execa";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import {
|
import { copyAsync, dirAsync, existsAsync, removeAsync } from "fs-jetpack";
|
||||||
copyAsync,
|
|
||||||
dirAsync,
|
|
||||||
existsAsync,
|
|
||||||
removeAsync
|
|
||||||
} from "fs-jetpack";
|
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
|
||||||
|
const g = global as any;
|
||||||
|
if (!g.dockerPrepared) {
|
||||||
|
g.dockerPrepared = true;
|
||||||
const dir = {
|
const dir = {
|
||||||
path(...allpath: any[]) {
|
path(...allpath: any[]) {
|
||||||
return path.join(process.cwd(), ...allpath);
|
return path.join(process.cwd(), ...allpath);
|
||||||
|
|
@ -45,9 +43,13 @@ if (!(await existsAsync(dir.path("_tmp_docker")))) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await copyAsync(dir.path("bun.lockb"), dir.path("_tmp_docker", "bun.lockb"));
|
await copyAsync(
|
||||||
|
dir.path("bun.lockb"),
|
||||||
|
dir.path("_tmp_docker", "bun.lockb")
|
||||||
|
);
|
||||||
|
|
||||||
await $({ cwd: dir.path("_tmp_docker") })`zip -r ../docker .`;
|
await $({ cwd: dir.path("_tmp_docker") })`zip -r ../docker .`;
|
||||||
await $`mv docker.zip dockerzip`;
|
await $`mv docker.zip dockerzip`;
|
||||||
await removeAsync(dir.path("_tmp_docker"));
|
await removeAsync(dir.path("_tmp_docker"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue