diff --git a/.releaserc b/.releaserc index 2016201..d73b978 100644 --- a/.releaserc +++ b/.releaserc @@ -5,5 +5,41 @@ {"name": "master", "prerelease": true} ], "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + ["@google/semantic-release-replace-plugin", { + "replacements": [ + { + "files": ["src/environments/environment.ts", "src/environments/environment.prod.ts"], + "from": "appVersion: \".*\"", + "to": "appVersion: \"${nextRelease.version}\"", + "results": [ + { + "file": "src/environments/environment.ts", + "hasChanged": true, + "numMatches": 1, + "numReplacements": 1 + }, + { + "file": "src/environments/environment.prod.ts", + "hasChanged": true, + "numMatches": 1, + "numReplacements": 1 + } + ], + "countMatches": true + } + ] + }], + ["@semantic-release/npm", { + "npmPublish": false + }], + ["@semantic-release/git", { + "assets": ["src/environments/environment.ts", "src/environments/environment.prod.ts", "package.json", "package-lock.json"], + "message": "chore(release): ${nextRelease.version} \n\n${nextRelease.notes}" + }], + ["@semantic-release/github", { + "assets": [] + }], ] } diff --git a/package.json b/package.json index 2a102ce..402e6de 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "ndb-core", + "name": "ndb-testing", "version": "2.53.0", "license": "GPL-3.0", "scripts": { @@ -20,68 +20,8 @@ }, "private": true, "dependencies": { - "@angular/animations": "^11.2.12", - "@angular/cdk": "^11.2.13", - "@angular/common": "^11.2.12", - "@angular/compiler": "^11.2.12", - "@angular/core": "^11.2.12", - "@angular/flex-layout": "^11.0.0-beta.33", - "@angular/forms": "^11.2.12", - "@angular/localize": "^11.2.12", - "@angular/material": "^11.2.13", - "@angular/platform-browser": "^11.2.12", - "@angular/platform-browser-dynamic": "^11.2.12", - "@angular/router": "^11.2.12", - "@angular/service-worker": "^11.2.12", - "@ngneat/until-destroy": "^8.0.4", - "@sentry/browser": "^6.8.0", - "angulartics2": "^10.0.0", - "crypto-js": "^4.0.0", - "deep-object-diff": "^1.1.0", - "faker": "^5.5.3", - "flag-icon-css": "^3.5.0", - "font-awesome": "^4.7.0", - "idb": "^6.1.2", - "json-query": "^2.2.2", - "lodash": "^4.17.21", - "md5": "^2.3.0", - "moment": "^2.29.1", - "ngx-filter-pipe": "^2.1.2", - "ngx-markdown": "^11.1.3", - "ngx-papaparse": "^5.0.0", - "pouchdb-adapter-memory": "^7.2.2", - "pouchdb-authentication": "^1.1.3", - "pouchdb-browser": "^7.2.2", - "reflect-metadata": "^0.1.13", - "reveal": "0.0.4", - "rxjs": "^6.6.7", - "stream": "0.0.2", - "tslib": "^2.3.0", - "uuid": "^8.3.2", - "webdav": "^4.4.0", - "zone.js": "~0.11.4" }, "devDependencies": { - "@angular-devkit/build-angular": "~0.1102.3", - "@angular/cli": "^11.2.3", - "@angular/compiler-cli": "^11.2.4", - "@babel/core": "^7.13.8", - "@compodoc/compodoc": "^1.1.14", - "@schematics/angular": "^11.2.3", - "@storybook/addon-actions": "^6.1.21", - "@storybook/addon-essentials": "^6.1.21", - "@storybook/addon-links": "^6.1.21", - "@storybook/angular": "^6.1.21", - "@types/crypto-js": "^4.0.1", - "@types/faker": "^5.5.0", - "@types/file-saver": "^2.0.1", - "@types/jasmine": "~3.6.4", - "@types/lodash": "^4.14.168", - "@types/node": "^14.14.31", - "@types/pouchdb": "^6.4.0", - "babel-loader": "^8.2.2", - "codelyzer": "^6.0.1", - "husky": "^5.1.3", "jasmine-core": "~3.7.1", "jasmine-spec-reporter": "~6.0.0", "karma": "~6.3.1", @@ -92,7 +32,6 @@ "karma-jasmine": "~4.0.1", "karma-jasmine-html-reporter": "^1.5.4", "lint-staged": "^10.5.4", - "ngx-i18nsupport": "^0.17.1", "prettier": "^2.2.1", "protractor": "~7.0.0", "ts-node": "^9.1.1", diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts new file mode 100644 index 0000000..74d284f --- /dev/null +++ b/src/environments/environment.prod.ts @@ -0,0 +1,32 @@ +/* + * This file is part of ndb-core. + * + * ndb-core is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * ndb-core is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ndb-core. If not, see . + */ + +/** + * Central environment that allows to configure differences between a "dev" and a "prod" build. + * + * The file contents for the current environment will overwrite these during build. + * The build system defaults to the dev environment which uses `environment.ts`, but if you do + * `ng build --env=prod` then `environment.prod.ts` will be used instead. + * The list of which env maps to which file can be found in `.angular-cli.json`. + */ +export const environment = { + production: true, + appVersion: "2.53.0", // replaced automatically by semantic-release + repositoryId: "Aam-Digital/ndb-core", + remoteLoggingDsn: + "https://bd6aba79ca514d35bb06a4b4e0c2a21e@sentry.io/1242399", +}; diff --git a/src/environments/environment.ts b/src/environments/environment.ts new file mode 100644 index 0000000..fb7c4eb --- /dev/null +++ b/src/environments/environment.ts @@ -0,0 +1,31 @@ +/* + * This file is part of ndb-core. + * + * ndb-core is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * ndb-core is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ndb-core. If not, see . + */ + +/** + * Central environment that allows to configure differences between a "dev" and a "prod" build. + * + * The file contents for the current environment will overwrite these during build. + * The build system defaults to the dev environment which uses `environment.ts`, but if you do + * `ng build --env=prod` then `environment.prod.ts` will be used instead. + * The list of which env maps to which file can be found in `.angular-cli.json`. + */ +export const environment = { + production: false, + appVersion: "2.53.0", // replaced automatically by semantic-release + repositoryId: "Aam-Digital/ndb-core", + remoteLoggingDsn: undefined, // only set for production mode in environment.prod.ts +};