diff --git a/.travis.yml b/.travis.yml
index d4b36a8c7..7512b9664 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,8 +27,6 @@ stages:
- name: Quality and Unit tests
- name: Publish Docker Registry
if: (type = push AND tag IS blank) OR type = api
- - name: Release Libraries
- if: branch = master AND type = push
- name: Release Tag
if: branch = master AND type = push
- name: e2e
diff --git a/angular.json b/angular.json
index fa3e23911..f871fe16d 100644
--- a/angular.json
+++ b/angular.json
@@ -138,6 +138,14 @@
}
]
},
+ "release": {
+ "fileReplacements": [
+ {
+ "replace": "src/environments/environment.ts",
+ "with": "src/environments/environment.release.ts"
+ }
+ ]
+ },
"e2e": {
"budgets": [
{
@@ -177,6 +185,9 @@
},
"e2e": {
"browserTarget": "app:build:e2e"
+ },
+ "release": {
+ "browserTarget": "app:build:release"
}
}
},
@@ -484,4 +495,4 @@
"packageManager": "npm",
"analytics": false
}
-}
\ No newline at end of file
+}
diff --git a/docker/build.sh b/docker/build.sh
index 57e097e7d..ee225e823 100755
--- a/docker/build.sh
+++ b/docker/build.sh
@@ -4,4 +4,4 @@ set -e
echo building $1
npm clean-install
-npm run build $*
+npm run build.release $*
diff --git a/docs/getting-started/docker.md b/docs/getting-started/docker.md
index 90040c8a6..6c816e279 100644
--- a/docs/getting-started/docker.md
+++ b/docs/getting-started/docker.md
@@ -16,7 +16,7 @@ The application runs in two modes:
Run the local instance of the application packaged into the docker image together with the ACS images:
```sh
-npm run build
+npm run build.release
npm run start:docker
```
diff --git a/docs/ja/getting-started/docker.md b/docs/ja/getting-started/docker.md
index 9752ce18e..047286c1a 100644
--- a/docs/ja/getting-started/docker.md
+++ b/docs/ja/getting-started/docker.md
@@ -17,7 +17,7 @@ ACA には ACS 6.0 Community 版が事前構成されています。
ACS イメージと共に、Docker イメージにパッケージ化されたアプリケーションのローカルインスタンスを実行します:
```sh
-npm run build
+npm run build.release
npm run start:docker
```
diff --git a/package.json b/package.json
index fe366c7ae..07d4466cc 100644
--- a/package.json
+++ b/package.json
@@ -8,9 +8,10 @@
"ng": "ng",
"start": "npm run validate-config && ng serve --open",
"start:prod": "npm run validate-config && node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng serve --prod --open",
- "build.app": "node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build app --prod",
+ "build.app": "node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build app",
"build": "npm run validate-config && npm run build.app -- --prod",
"build.e2e": "npm run build.app -- --prod --configuration=e2e",
+ "build.release": "npm run build.app -- --configuration=production,release",
"test": "ng test app --code-coverage",
"lite-serve": "./scripts/run lite-serve",
"test:ci": "ng test adf-office-services-ext --watch=false && ng test app --code-coverage --watch=false",
diff --git a/scripts/travis/deploy/publish.sh b/scripts/travis/deploy/publish.sh
index 26ce7982e..3f337946c 100755
--- a/scripts/travis/deploy/publish.sh
+++ b/scripts/travis/deploy/publish.sh
@@ -4,7 +4,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROJECT_AFFECTED=$1
cd $DIR/../../../
-npm run build
+npm run build.release
# Get Tag Image
TAG_VERSION=$(./scripts/travis/deploy/get-docker-image-tag-name.sh)
diff --git a/src/app/extensions.module.ts b/src/app/extensions.module.ts
index df43e997a..0ae3fead7 100644
--- a/src/app/extensions.module.ts
+++ b/src/app/extensions.module.ts
@@ -26,11 +26,10 @@
import { NgModule } from '@angular/core';
import { AosExtensionModule } from '@alfresco/adf-office-services-ext';
import { AcaAboutModule } from '@alfresco/aca-about';
-
-// Main entry point for external extensions only.
-// For any application-specific code use CoreExtensionsModule instead.
+import { AcaSettingsModule } from '@alfresco/aca-settings';
+import { environment } from '../environments/environment';
@NgModule({
- imports: [AosExtensionModule, AcaAboutModule]
+ imports: [AosExtensionModule, ...(environment.devTools ? [AcaAboutModule, AcaSettingsModule] : [])]
})
export class AppExtensionsModule {}
diff --git a/src/assets/app.extensions.json b/src/assets/app.extensions.json
index bf1a05de6..b90935ed4 100644
--- a/src/assets/app.extensions.json
+++ b/src/assets/app.extensions.json
@@ -8,7 +8,7 @@
"$runtime": "1.7.0",
"$description": "Core application extensions and features",
"$references": [],
- "$ignoreReferenceList": ["about.plugin.json", "settings.plugin.json"],
+ "$ignoreReferenceList": [],
"rules": [
{
diff --git a/src/environments/environment.e2e.ts b/src/environments/environment.e2e.ts
index bfb5fce27..d77d3981d 100644
--- a/src/environments/environment.e2e.ts
+++ b/src/environments/environment.e2e.ts
@@ -23,12 +23,10 @@
* along with Alfresco. If not, see .
*/
-// 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`.
+import ContentAppEnvironment from './environment.interface';
-export const environment = {
+export const environment: ContentAppEnvironment = {
production: true,
- e2e: true
+ e2e: true,
+ devTools: false
};
diff --git a/src/environments/environment.interface.ts b/src/environments/environment.interface.ts
new file mode 100644
index 000000000..675a8cba5
--- /dev/null
+++ b/src/environments/environment.interface.ts
@@ -0,0 +1,30 @@
+/*!
+ * @license
+ * Alfresco Example Content Application
+ *
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
+ *
+ * This file is part of the Alfresco Example Content Application.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * The Alfresco Example Content Application 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ */
+
+export default interface ContentAppEnvironment {
+ production: boolean;
+ e2e: boolean;
+ devTools: boolean;
+}
diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts
index 89baf01f1..943d26921 100644
--- a/src/environments/environment.prod.ts
+++ b/src/environments/environment.prod.ts
@@ -23,7 +23,10 @@
* along with Alfresco. If not, see .
*/
-export const environment = {
+import ContentAppEnvironment from './environment.interface';
+
+export const environment: ContentAppEnvironment = {
production: true,
- e2e: false
+ e2e: false,
+ devTools: true
};
diff --git a/src/environments/environment.release.ts b/src/environments/environment.release.ts
new file mode 100644
index 000000000..0e424d1a6
--- /dev/null
+++ b/src/environments/environment.release.ts
@@ -0,0 +1,32 @@
+/*!
+ * @license
+ * Alfresco Example Content Application
+ *
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
+ *
+ * This file is part of the Alfresco Example Content Application.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * The Alfresco Example Content Application 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ */
+
+import ContentAppEnvironment from './environment.interface';
+
+export const environment: ContentAppEnvironment = {
+ production: true,
+ e2e: false,
+ devTools: false
+};
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 7e46f647e..ddc09f994 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -23,12 +23,10 @@
* along with Alfresco. If not, see .
*/
-// 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`.
+import ContentAppEnvironment from './environment.interface';
-export const environment = {
+export const environment: ContentAppEnvironment = {
production: false,
- e2e: false
+ e2e: false,
+ devTools: true
};