mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
[ACA-3346] Fix build script (#1476)
* [ACA-3317] Improve build script * Improve code * Remove update-commit-sha.sh
This commit is contained in:
parent
51b461f859
commit
cb1b3fa236
@ -48,6 +48,7 @@ jobs:
|
|||||||
|
|
||||||
- stage: Quality and Unit tests
|
- stage: Quality and Unit tests
|
||||||
name: 'Build (without animation)'
|
name: 'Build (without animation)'
|
||||||
|
before_script: npx @alfresco/adf-cli update-commit-sha --pointer "HEAD" --pathPackage "$(pwd)"
|
||||||
script: npm ci && npm run build.e2e
|
script: npm ci && npm run build.e2e
|
||||||
after_success: ./scripts/ci/utils/artifact-to-s3.sh -a ./dist/app -o "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2"
|
after_success: ./scripts/ci/utils/artifact-to-s3.sh -a ./dist/app -o "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2"
|
||||||
cache: false
|
cache: false
|
||||||
|
11
package.json
11
package.json
@ -8,11 +8,11 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "npm run validate-config && ng serve --open",
|
"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",
|
"start:prod": "npm run validate-config && node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng serve --prod --open",
|
||||||
"build:aos-extension": "npm run update-commit-sha -- -gnu && npx rimraf dist/@alfresco/adf-office-services-ext && ng build adf-office-services-ext && cpr projects/adf-office-services-ext/ngi.json dist/@alfresco/adf-office-services-ext/ngi.json && cpr projects/adf-office-services-ext/assets dist/@alfresco/adf-office-services-ext/assets",
|
"build:aos-extension": "npx rimraf dist/@alfresco/adf-office-services-ext && ng build adf-office-services-ext && cpr projects/adf-office-services-ext/ngi.json dist/@alfresco/adf-office-services-ext/ngi.json && cpr projects/adf-office-services-ext/assets dist/@alfresco/adf-office-services-ext/assets",
|
||||||
"build.shared": "npm run update-commit-sha -- -gnu && ng build aca-shared",
|
"build.shared": "ng build aca-shared",
|
||||||
"build.aos": "npm run build:aos-extension",
|
"build.aos": "npm run build:aos-extension",
|
||||||
"build.extensions": "npm run update-commit-sha -- -gnu && npm run build.shared && npm run build.aos",
|
"build.extensions": "npm run build.shared && npm run build.aos",
|
||||||
"build.app": "npm run update-commit-sha -- -gnu && node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build app",
|
"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": "npm run validate-config && npm run build.app -- --prod",
|
||||||
"build.e2e": "npm run build.app -- --prod --configuration=e2e",
|
"build.e2e": "npm run build.app -- --prod --configuration=e2e",
|
||||||
"test": "ng test app --code-coverage",
|
"test": "ng test app --code-coverage",
|
||||||
@ -27,8 +27,7 @@
|
|||||||
"e2e:docker": "./start.sh && npm run e2e && ./start.sh -d",
|
"e2e:docker": "./start.sh && npm run e2e && ./start.sh -d",
|
||||||
"spellcheck": "cspell '{src,e2e,projects}/**/*.ts'",
|
"spellcheck": "cspell '{src,e2e,projects}/**/*.ts'",
|
||||||
"inspect.bundle": "ng build app --prod --stats-json && npx webpack-bundle-analyzer dist/app/stats.json",
|
"inspect.bundle": "ng build app --prod --stats-json && npx webpack-bundle-analyzer dist/app/stats.json",
|
||||||
"validate-config": "ajv validate -s ./node_modules/@alfresco/adf-core/app.config.schema.json -d ./src/app.config.json --errors=text --verbose",
|
"validate-config": "ajv validate -s ./node_modules/@alfresco/adf-core/app.config.schema.json -d ./src/app.config.json --errors=text --verbose"
|
||||||
"update-commit-sha": "./scripts/update-commit-sha.sh"
|
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
eval GNU=false
|
|
||||||
|
|
||||||
show_help() {
|
|
||||||
echo "Usage: update-commit-sha.sh"
|
|
||||||
echo ""
|
|
||||||
echo "-gnu for gnu"
|
|
||||||
}
|
|
||||||
|
|
||||||
gnu_mode() {
|
|
||||||
echo "====== GNU MODE ====="
|
|
||||||
GNU=true
|
|
||||||
}
|
|
||||||
|
|
||||||
while [[ $1 == -* ]]; do
|
|
||||||
case "$1" in
|
|
||||||
-h|--help|-\?) show_help; exit 0;;
|
|
||||||
-gnu) gnu_mode; shift;;
|
|
||||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
npm install @alfresco/adf-cli@alpha
|
|
||||||
if $GNU; then
|
|
||||||
./node_modules/@alfresco/adf-cli/bin/adf-cli update-commit-sha --pointer "HEAD" --pathPackage "$(pwd)"
|
|
||||||
else
|
|
||||||
./node_modules/@alfresco/adf-cli/bin/adf-cli update-commit-sha --pointer "HEAD" --pathPackage "$(pwd)" --skipGnu
|
|
||||||
fi
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user