From 5e5cba9e4221665f8e9b0ba5d6c1874f5817089b Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 25 Mar 2024 07:40:02 +0100 Subject: [PATCH] chore: fix build-win32 script --- apps/_boilerplate/app/package.json | 5 ++++- apps/appcontainer-node/app/package.json | 5 ++++- apps/http-server/app/package.json | 5 ++++- apps/package-manager/app/package.json | 5 ++++- apps/quantel-http-transformer-proxy/app/package.json | 5 ++++- apps/single-app/app/package.json | 5 ++++- apps/worker/app/package.json | 5 ++++- apps/workforce/app/package.json | 5 ++++- scripts/build-win32.mjs | 2 ++ yarn.lock | 8 ++++++++ 10 files changed, 42 insertions(+), 8 deletions(-) diff --git a/apps/_boilerplate/app/package.json b/apps/_boilerplate/app/package.json index fd28219e..22b4658b 100644 --- a/apps/_boilerplate/app/package.json +++ b/apps/_boilerplate/app/package.json @@ -6,7 +6,7 @@ "scripts": { "build": "run -T rimraf dist && yarn build:main", "build:main": "tsc -p tsconfig.json", - "build-win32": "mkdir deploy & node ../../../scripts/build-win32.mjs boilerplate.exe && node ../../../scripts/copy-natives.js win32-x64", + "build-win32": "node ../../../scripts/build-win32.mjs boilerplate.exe && node ../../../scripts/copy-natives.js win32-x64", "__test": "jest", "start": "node dist/index.js" }, @@ -24,5 +24,8 @@ "*.{ts,tsx}": [ "eslint" ] + }, + "devDependencies": { + "lerna": "^6.6.1" } } diff --git a/apps/appcontainer-node/app/package.json b/apps/appcontainer-node/app/package.json index 3c6b83da..e8fcb945 100644 --- a/apps/appcontainer-node/app/package.json +++ b/apps/appcontainer-node/app/package.json @@ -6,7 +6,7 @@ "scripts": { "build": "run -T rimraf dist && yarn build:main", "build:main": "tsc -p tsconfig.json", - "build-win32": "mkdir deploy & node ../../../scripts/build-win32.mjs appContainer-node.exe && node ../../../scripts/copy-natives.js win32-x64", + "build-win32": "node ../../../scripts/build-win32.mjs appContainer-node.exe && node ../../../scripts/copy-natives.js win32-x64", "__test": "jest", "start": "node dist/index.js" }, @@ -24,5 +24,8 @@ "*.{ts,tsx}": [ "eslint" ] + }, + "devDependencies": { + "lerna": "^6.6.1" } } diff --git a/apps/http-server/app/package.json b/apps/http-server/app/package.json index 5ddaa00e..f4758dde 100644 --- a/apps/http-server/app/package.json +++ b/apps/http-server/app/package.json @@ -6,7 +6,7 @@ "scripts": { "build": "run -T rimraf dist && yarn build:main", "build:main": "tsc -p tsconfig.json", - "build-win32": "mkdir deploy & node ../../../scripts/build-win32.mjs http-server.exe && node ../../../scripts/copy-natives.js win32-x64", + "build-win32": "node ../../../scripts/build-win32.mjs http-server.exe && node ../../../scripts/copy-natives.js win32-x64", "__test": "jest", "start": "node dist/index.js" }, @@ -24,5 +24,8 @@ "*.{ts,tsx}": [ "eslint" ] + }, + "devDependencies": { + "lerna": "^6.6.1" } } diff --git a/apps/package-manager/app/package.json b/apps/package-manager/app/package.json index 03b15b75..fbbb3d9d 100644 --- a/apps/package-manager/app/package.json +++ b/apps/package-manager/app/package.json @@ -5,7 +5,7 @@ "scripts": { "build": "run -T rimraf dist && yarn build:main", "build:main": "tsc -p tsconfig.json", - "build-win32": "mkdir deploy & node ../../../scripts/build-win32.mjs package-manager.exe && node ../../../scripts/copy-natives.js win32-x64", + "build-win32": "node ../../../scripts/build-win32.mjs package-manager.exe && node ../../../scripts/copy-natives.js win32-x64", "__test": "jest", "start": "node dist/index.js" }, @@ -23,5 +23,8 @@ "*.{ts,tsx}": [ "eslint" ] + }, + "devDependencies": { + "lerna": "^6.6.1" } } diff --git a/apps/quantel-http-transformer-proxy/app/package.json b/apps/quantel-http-transformer-proxy/app/package.json index b610e8af..743abad8 100644 --- a/apps/quantel-http-transformer-proxy/app/package.json +++ b/apps/quantel-http-transformer-proxy/app/package.json @@ -6,7 +6,7 @@ "scripts": { "build": "run -T rimraf dist && yarn build:main", "build:main": "tsc -p tsconfig.json", - "build-win32": "mkdir deploy & node ../../../scripts/build-win32.mjs quantel-http-transformer-proxy.exe && node ../../../scripts/copy-natives.js win32-x64", + "build-win32": "node ../../../scripts/build-win32.mjs quantel-http-transformer-proxy.exe && node ../../../scripts/copy-natives.js win32-x64", "start": "node dist/index.js" }, "dependencies": { @@ -23,5 +23,8 @@ "*.{ts,tsx}": [ "eslint" ] + }, + "devDependencies": { + "lerna": "^6.6.1" } } diff --git a/apps/single-app/app/package.json b/apps/single-app/app/package.json index 99087717..0e1c77bf 100644 --- a/apps/single-app/app/package.json +++ b/apps/single-app/app/package.json @@ -6,7 +6,7 @@ "scripts": { "build": "run -T rimraf dist && yarn build:main", "build:main": "tsc -p tsconfig.json", - "build-win32": "mkdir deploy & node ../../../scripts/build-win32.mjs package-manager-single-app.exe && node ../../../scripts/copy-natives.js win32-x64", + "build-win32": "node ../../../scripts/build-win32.mjs package-manager-single-app.exe && node ../../../scripts/copy-natives.js win32-x64", "__test": "jest", "start": "node --inspect dist/index.js" }, @@ -31,5 +31,8 @@ "*.{ts,tsx}": [ "eslint" ] + }, + "devDependencies": { + "lerna": "^6.6.1" } } diff --git a/apps/worker/app/package.json b/apps/worker/app/package.json index 26ea7544..a5035749 100644 --- a/apps/worker/app/package.json +++ b/apps/worker/app/package.json @@ -7,7 +7,7 @@ "build": "run -T rimraf dist && yarn build:main", "build:main": "tsc -p tsconfig.json", "oldbuild-win32": "mkdir deploy & rimraf deploy/worker.exe && nexe dist/index.js -t windows-x64-12.18.1 -o deploy/worker.exe && node scripts/copy-natives.js win32-x64", - "build-win32": "mkdir deploy & node ../../../scripts/build-win32.mjs worker.exe && node ../../../scripts/copy-natives.js win32-x64", + "build-win32": "node ../../../scripts/build-win32.mjs worker.exe && node ../../../scripts/copy-natives.js win32-x64", "__test": "jest", "start": "node dist/index.js" }, @@ -25,5 +25,8 @@ "*.{ts,tsx}": [ "eslint" ] + }, + "devDependencies": { + "lerna": "^6.6.1" } } diff --git a/apps/workforce/app/package.json b/apps/workforce/app/package.json index 4ffbd9df..05876a1e 100644 --- a/apps/workforce/app/package.json +++ b/apps/workforce/app/package.json @@ -6,7 +6,7 @@ "scripts": { "build": "run -T rimraf dist && yarn build:main", "build:main": "tsc -p tsconfig.json", - "build-win32": "mkdir deploy & node ../../../scripts/build-win32.mjs workforce.exe && node ../../../scripts/copy-natives.js win32-x64", + "build-win32": "node ../../../scripts/build-win32.mjs workforce.exe && node ../../../scripts/copy-natives.js win32-x64", "__test": "jest", "start": "node dist/index.js" }, @@ -24,5 +24,8 @@ "*.{ts,tsx}": [ "eslint" ] + }, + "devDependencies": { + "lerna": "^6.6.1" } } diff --git a/scripts/build-win32.mjs b/scripts/build-win32.mjs index 76d29893..6621c172 100644 --- a/scripts/build-win32.mjs +++ b/scripts/build-win32.mjs @@ -25,6 +25,8 @@ if (!executableName) { } ;(async () => { + await fse.mkdirp(outputDirectory) + log(`Collecting dependencies for ${packageJson.name}...`) // List all Lerna packages: const list = await exec('yarn lerna list -a --json') diff --git a/yarn.lock b/yarn.lock index e5300cf8..683239eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39,6 +39,7 @@ __metadata: resolution: "@appcontainer-node/app@workspace:apps/appcontainer-node/app" dependencies: "@appcontainer-node/generic": "npm:1.50.2-alpha.1" + lerna: "npm:^6.6.1" languageName: unknown linkType: soft @@ -505,6 +506,7 @@ __metadata: resolution: "@boilerplate/app@workspace:apps/_boilerplate/app" dependencies: "@boilerplate/generic": "npm:1.50.2-alpha.1" + lerna: "npm:^6.6.1" languageName: unknown linkType: soft @@ -586,6 +588,7 @@ __metadata: resolution: "@http-server/app@workspace:apps/http-server/app" dependencies: "@http-server/generic": "npm:1.50.2-alpha.1" + lerna: "npm:^6.6.1" languageName: unknown linkType: soft @@ -1628,6 +1631,7 @@ __metadata: resolution: "@package-manager/app@workspace:apps/package-manager/app" dependencies: "@package-manager/generic": "npm:1.50.2-alpha.1" + lerna: "npm:^6.6.1" languageName: unknown linkType: soft @@ -1809,6 +1813,7 @@ __metadata: resolution: "@quantel-http-transformer-proxy/app@workspace:apps/quantel-http-transformer-proxy/app" dependencies: "@quantel-http-transformer-proxy/generic": "npm:1.50.2-alpha.1" + lerna: "npm:^6.6.1" languageName: unknown linkType: soft @@ -1878,6 +1883,7 @@ __metadata: "@sofie-package-manager/api": "npm:1.50.2-alpha.1" "@sofie-package-manager/worker": "npm:1.50.2-alpha.1" "@sofie-package-manager/workforce": "npm:1.50.2-alpha.1" + lerna: "npm:^6.6.1" underscore: "npm:^1.12.0" languageName: unknown linkType: soft @@ -2761,6 +2767,7 @@ __metadata: resolution: "@worker/app@workspace:apps/worker/app" dependencies: "@worker/generic": "npm:1.50.2-alpha.1" + lerna: "npm:^6.6.1" languageName: unknown linkType: soft @@ -2778,6 +2785,7 @@ __metadata: resolution: "@workforce/app@workspace:apps/workforce/app" dependencies: "@workforce/generic": "npm:1.50.2-alpha.1" + lerna: "npm:^6.6.1" languageName: unknown linkType: soft