From 64d468127590be94fdb88316a57bb69ff74c7f1d Mon Sep 17 00:00:00 2001 From: Sebastien Guillemot Date: Sat, 9 Dec 2023 09:42:29 +0900 Subject: [PATCH] patch mysteriously broken NX command --- package.json | 2 +- packages/engine/paima-standalone/scripts/package.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ac3af682f..c937c45ec 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "build": "npm run lint:configs && npx nx run-many --parallel=${NX_PARALLEL:-3} -t build", "test": "npm run lint:configs && npx nx run-many --parallel=${NX_PARALLEL:-3} -t test", "release:lib": "./wipe.sh && sh ./tools/scripts/bump-version.sh && npm run build && npm run lint && npm run test && read -p 'Enter OTP: ' otp && export NPM_CONFIG_OTP=$otp && npx nx release publish -g paima-sdk && npx nx release publish -g node-sdk && npx nx release publish -g build-utils", - "release:bin": "./wipe.sh && npm run lint:configs && npx nx run-many --parallel=${NX_PARALLEL:-3} -t release && mkdir -p ./bin && cp -r ./packages/engine/paima-standalone/packaged/@standalone/* ./bin" + "release:bin": "./wipe.sh && npm run lint:configs && echo 'This command usually fails from NX, so go in the right folders and run /npm run release/ manually:\nnpx nx run-many --parallel=${NX_PARALLEL:-3} -t release\nPress any key to continue once done' && read _ && mkdir -p ./bin && cp -r ./packages/engine/paima-standalone/packaged/@standalone/* ./bin" }, "devDependencies": { "@eslint/eslintrc": "^2.1.2", diff --git a/packages/engine/paima-standalone/scripts/package.js b/packages/engine/paima-standalone/scripts/package.js index 59ca00fbb..f3bd4389d 100644 --- a/packages/engine/paima-standalone/scripts/package.js +++ b/packages/engine/paima-standalone/scripts/package.js @@ -23,6 +23,8 @@ function createTmpConfig() { fs.mkdirSync(getTmpFolder(), { recursive: true }); } config.pkg.assets.push(`./batcher-bin/${getBatcherName()}`); + // note: config.pkg here has two compilation targets + // we keep it that way on purpose since prod builds require us to build all architectures at the same time fs.writeFileSync(getTmpFile(), JSON.stringify(config, null, 2)); } function getBatcherName() {