From 08b40ecc177297b00069627f17ab1657625edd26 Mon Sep 17 00:00:00 2001 From: temarusanov Date: Thu, 2 Nov 2023 20:09:19 +0700 Subject: [PATCH] fix: add version command to apps --- apps/api/project.json | 32 +++++++++++++++++++++++++------- apps/gateway/project.json | 28 ++++++++++++++++++++++------ 2 files changed, 47 insertions(+), 13 deletions(-) diff --git a/apps/api/project.json b/apps/api/project.json index 6f969d1..4f7c5f9 100644 --- a/apps/api/project.json +++ b/apps/api/project.json @@ -6,15 +6,21 @@ "targets": { "build": { "executor": "@nx/webpack:webpack", - "dependsOn": ["^prisma:generate"], - "outputs": ["{options.outputPath}"], + "dependsOn": [ + "^prisma:generate" + ], + "outputs": [ + "{options.outputPath}" + ], "options": { "target": "node", "compiler": "tsc", "outputPath": "dist/apps/api", "main": "apps/api/src/main.ts", "tsConfig": "apps/api/tsconfig.app.json", - "assets": ["apps/api/src/assets"] + "assets": [ + "apps/api/src/assets" + ] }, "configurations": { "production": { @@ -43,14 +49,26 @@ }, "lint": { "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"], + "outputs": [ + "{options.outputFile}" + ], "options": { - "lintFilePatterns": ["apps/api/**/*.ts"] + "lintFilePatterns": [ + "apps/api/**/*.ts" + ] + } + }, + "version": { + "executor": "@jscutlery/semver:version", + "options": { + "trackDeps": true } }, "test": { "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "outputs": [ + "{workspaceRoot}/coverage/{projectRoot}" + ], "options": { "jestConfig": "apps/api/jest.config.ts", "passWithNoTests": true @@ -58,4 +76,4 @@ } }, "tags": [] -} +} \ No newline at end of file diff --git a/apps/gateway/project.json b/apps/gateway/project.json index 74c1a64..58133f4 100644 --- a/apps/gateway/project.json +++ b/apps/gateway/project.json @@ -7,14 +7,18 @@ "build": { "executor": "@nx/webpack:webpack", "dependsOn": [], - "outputs": ["{options.outputPath}"], + "outputs": [ + "{options.outputPath}" + ], "options": { "target": "node", "compiler": "tsc", "outputPath": "dist/apps/gateway", "main": "apps/gateway/src/main.ts", "tsConfig": "apps/gateway/tsconfig.app.json", - "assets": ["apps/gateway/src/assets"] + "assets": [ + "apps/gateway/src/assets" + ] }, "configurations": { "production": { @@ -43,14 +47,26 @@ }, "lint": { "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"], + "outputs": [ + "{options.outputFile}" + ], "options": { - "lintFilePatterns": ["apps/gateway/**/*.ts"] + "lintFilePatterns": [ + "apps/gateway/**/*.ts" + ] + } + }, + "version": { + "executor": "@jscutlery/semver:version", + "options": { + "trackDeps": true } }, "test": { "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "outputs": [ + "{workspaceRoot}/coverage/{projectRoot}" + ], "options": { "jestConfig": "apps/gateway/jest.config.ts", "passWithNoTests": true @@ -58,4 +74,4 @@ } }, "tags": [] -} +} \ No newline at end of file