[AAE-4628] Release without the About and Settings modules, but have them baked into the app otherwise (#2022)

This commit is contained in:
Popovics András 2021-02-25 22:52:14 +01:00 committed by GitHub
parent 287b88e525
commit 2859b16356
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 97 additions and 27 deletions

View File

@ -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

View File

@ -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"
}
}
},

View File

@ -4,4 +4,4 @@ set -e
echo building $1
npm clean-install
npm run build $*
npm run build.release $*

View File

@ -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
```

View File

@ -17,7 +17,7 @@ ACA には ACS 6.0 Community 版が事前構成されています。
ACS イメージと共に、Docker イメージにパッケージ化されたアプリケーションのローカルインスタンスを実行します:
```sh
npm run build
npm run build.release
npm run start:docker
```

View File

@ -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",

View File

@ -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)

View File

@ -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 {}

View File

@ -8,7 +8,7 @@
"$runtime": "1.7.0",
"$description": "Core application extensions and features",
"$references": [],
"$ignoreReferenceList": ["about.plugin.json", "settings.plugin.json"],
"$ignoreReferenceList": [],
"rules": [
{

View File

@ -23,12 +23,10 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
// 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
};

View File

@ -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 <http://www.gnu.org/licenses/>.
*/
export default interface ContentAppEnvironment {
production: boolean;
e2e: boolean;
devTools: boolean;
}

View File

@ -23,7 +23,10 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
export const environment = {
import ContentAppEnvironment from './environment.interface';
export const environment: ContentAppEnvironment = {
production: true,
e2e: false
e2e: false,
devTools: true
};

View File

@ -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 <http://www.gnu.org/licenses/>.
*/
import ContentAppEnvironment from './environment.interface';
export const environment: ContentAppEnvironment = {
production: true,
e2e: false,
devTools: false
};

View File

@ -23,12 +23,10 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
// 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
};