-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rely on Nx Parallel env var (#2561)
## Proposed change feat: rely on Nx Parallel env var docs: add developers explanation <!-- Please include a summary of the changes and the related issue. Please also include relevant motivation and context. --> ## Related issues <!-- Please make sure to follow the [contribution guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md) --> *- No issue associated -* <!-- * 🐛 Fix #issue --> <!-- * 🐛 Fix resolves #issue --> <!-- * 🚀 Feature #issue --> <!-- * 🚀 Feature resolves #issue --> <!-- * Pull Request #issue -->
- Loading branch information
Showing
2 changed files
with
33 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,31 +8,32 @@ | |
"ng": "yarn nx", | ||
"amaterasu": "node packages/@ama-terasu/cli/dist/src/cli/ama.js", | ||
"get:cpus-number": "node -e 'process.stdout.write(`${process.env.NX_PARALLEL || Math.max(require(\"os\").cpus().length - 1, 2)}`);'", | ||
"print:nx-parallel": "node -e \"process.stdout.write(`NX_PARALLEL=$(yarn get:cpus-number)`)\"", | ||
"get:current-dir": "node -e 'process.stdout.write(process.cwd());'", | ||
"create:scope": "yarn create-monorepo-scope", | ||
"build": "yarn nx run-many --target=build --parallel $(yarn get:cpus-number)", | ||
"build:affected": "yarn nx affected --target=build --parallel $(yarn get:cpus-number) --output-style stream", | ||
"build:tools": "yarn nx run-many --target=build --projects=eslint-plugin,workspace --parallel $(yarn get:cpus-number)", | ||
"build:lint": "yarn nx run-many --target=build --projects=eslint-plugin --parallel $(yarn get:cpus-number)", | ||
"build:swagger-gen": "yarn nx run-many --target=build-swagger --parallel $(yarn get:cpus-number)", | ||
"build": "yarn nx run-many --target=build", | ||
"build:affected": "yarn nx affected --target=build --output-style stream", | ||
"build:tools": "yarn nx run-many --target=build --projects=eslint-plugin,workspace", | ||
"build:lint": "yarn nx run-many --target=build --projects=eslint-plugin", | ||
"build:swagger-gen": "yarn nx run-many --target=build-swagger", | ||
"prepare:publish": "yarn prepare-publish \"$(yarn workspaces:list)\" --append dist", | ||
"publish": "yarn run prepare:publish && yarn nx run-many --target=publish --exclude=tag:private --parallel $(yarn get:cpus-number) --nx-bail", | ||
"publish:extensions": "yarn nx run-many --target=publish-extension --parallel $(yarn get:cpus-number)", | ||
"publish:extensions:affected": "yarn nx affected --target=publish-extension --parallel $(yarn get:cpus-number)", | ||
"package-github-actions:affected": "yarn nx affected --target=package-github-action --parallel $(yarn get:cpus-number)", | ||
"lint": "yarn nx run-many --target=lint --parallel $(yarn get:cpus-number)", | ||
"lint:affected": "yarn nx affected --target=lint --parallel $(yarn get:cpus-number)", | ||
"test": "yarn nx run-many --target=test --parallel $(yarn get:cpus-number) --cacheDirectory=$(yarn get:current-dir)/.cache/jest", | ||
"test:affected": "yarn nx affected --target=test --parallel $(yarn get:cpus-number) --cacheDirectory=$(yarn get:current-dir)/.cache/jest", | ||
"test-e2e": "yarn nx run-many --target=test-e2e --parallel $(yarn get:cpus-number)", | ||
"test-int": "yarn nx run-many --target=test-int --parallel $(yarn get:cpus-number)", | ||
"publish": "yarn run prepare:publish && yarn nx run-many --target=publish --exclude=tag:private --nx-bail", | ||
"publish:extensions": "yarn nx run-many --target=publish-extension", | ||
"publish:extensions:affected": "yarn nx affected --target=publish-extension", | ||
"package-github-actions:affected": "yarn nx affected --target=package-github-action", | ||
"lint": "yarn nx run-many --target=lint", | ||
"lint:affected": "yarn nx affected --target=lint", | ||
"test": "yarn nx run-many --target=test --cacheDirectory=$(yarn get:current-dir)/.cache/jest", | ||
"test:affected": "yarn nx affected --target=test --cacheDirectory=$(yarn get:current-dir)/.cache/jest", | ||
"test-e2e": "yarn nx run-many --target=test-e2e", | ||
"test-int": "yarn nx run-many --target=test-int", | ||
"postinstall": "husky && yarn build:lint && yarn harmonize:version && yarn update-yarn-sdks", | ||
"update-yarn-sdks": "node -e \"'pnp' !== '$(yarn config get nodeLinker)' || process.exit(1)\" || yarn dlx @yarnpkg/sdks", | ||
"build:storybook": "yarn doc:generate:json && yarn ng run storybook:extract-style && build-storybook", | ||
"clear": "rimraf -g './{packages,tools,apps}/{@*/,}{amaterasu/,}*/{dist,build,dist-*}/'", | ||
"set:version": "yarn o3r-set-version --placeholder 0.0.0-placeholder --include '{apps,packages}/**/dist/{package,manifest}.json'", | ||
"harmonize:version": "eslint '**/package.json*' '.yarnrc.yml' --quiet --fix", | ||
"doc:packages": "yarn nx run-many --target=documentation --parallel $(yarn get:cpus-number)", | ||
"doc:packages": "yarn nx run-many --target=documentation", | ||
"doc:root": "yarn prepare-doc-root-menu-template && yarn update-doc-summary ./docs && yarn compodoc", | ||
"doc:generate": "rimraf ./generated-doc && yarn doc:root && yarn doc:packages && yarn doc-links --docs ./docs --generated-doc ./generated-doc", | ||
"doc:generate:json": "yarn update-doc-summary ./docs && yarn compodoc -e json -d .", | ||
|
@@ -44,7 +45,7 @@ | |
"verdaccio:clean": "rimraf -g \".verdaccio/storage/@{o3r,ama-sdk,ama-terasu}\"", | ||
"verdaccio:login": "yarn cpy --cwd=./.verdaccio/conf .npmrc . --rename=.npmrc-logged && npx --yes npm-cli-login -u verdaccio -p verdaccio -e [email protected] -r http://127.0.0.1:4873 --config-path \".verdaccio/conf/.npmrc-logged\"", | ||
"verdaccio:prepare-publish": "yarn verdaccio:clean && yarn set:version 999.0.$(node -e 'process.stdout.write(String(Date.now()))') --include \"!**/!(dist)/package.json\" --include !package.json && yarn verdaccio:login && replace-in-files --regex=\"private(.*)true\" --replacement=private\\$1false '**/dist/package.json' && yarn run prepare:publish", | ||
"verdaccio:publish": "yarn run verdaccio:prepare-publish && yarn nx run-many --target=publish --parallel $(yarn get:cpus-number) --nx-bail --userconfig \".verdaccio/conf/.npmrc-logged\" --tag=latest --@o3r:registry=http://127.0.0.1:4873 --@ama-sdk:registry=http://127.0.0.1:4873 --@ama-terasu:registry=http://127.0.0.1:4873 --@o3r-training:registry=http://127.0.0.1:4873", | ||
"verdaccio:publish": "yarn run verdaccio:prepare-publish && yarn nx run-many --target=publish --nx-bail --userconfig \".verdaccio/conf/.npmrc-logged\" --tag=latest --@o3r:registry=http://127.0.0.1:4873 --@ama-sdk:registry=http://127.0.0.1:4873 --@ama-terasu:registry=http://127.0.0.1:4873 --@o3r-training:registry=http://127.0.0.1:4873", | ||
"verdaccio:stop": "docker container stop $(docker ps -a -q --filter=\"name=verdaccio\")", | ||
"verdaccio:all": "yarn verdaccio:stop && yarn verdaccio:start && yarn verdaccio:publish", | ||
"watch:vscode-extension": "yarn nx run vscode-extension:compile:watch", | ||
|