1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-27 04:35:25 +00:00

Don't ignore scripts for code-server prod yarn

This commit is contained in:
Asher 2020-03-16 12:47:39 -05:00
parent d192726e80
commit db4a4f0f50
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -135,7 +135,7 @@ class Builder {
])
})
await this.copyDependencies("code-server", this.rootPath, this.buildPath, {
await this.copyDependencies("code-server", this.rootPath, this.buildPath, false, {
commit,
version: this.codeServerVersion,
})
@ -181,13 +181,19 @@ class Builder {
])
})
await this.copyDependencies("vs code", this.vscodeSourcePath, vscodeBuildPath, {
await this.copyDependencies("vs code", this.vscodeSourcePath, vscodeBuildPath, true, {
commit,
date: new Date().toISOString(),
})
}
private async copyDependencies(name: string, sourcePath: string, buildPath: string, merge: object): Promise<void> {
private async copyDependencies(
name: string,
sourcePath: string,
buildPath: string,
ignoreScripts: boolean,
merge: object,
): Promise<void> {
await this.task(`copying ${name} dependencies`, async () => {
return Promise.all(
["node_modules", "package.json", "yarn.lock"].map((fileName) => {
@ -214,7 +220,9 @@ class Builder {
if (process.env.MINIFY) {
await this.task(`restricting ${name} to production dependencies`, async () => {
await util.promisify(cp.exec)("yarn --production --ignore-scripts", { cwd: buildPath })
await util.promisify(cp.exec)(`yarn --production ${ignoreScripts ? "--ignore-scripts" : ""}`, {
cwd: buildPath,
})
})
}
}