diff --git a/.travis.yml b/.travis.yml index ce4de2b6d..172d9dbe0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,6 +48,7 @@ jobs: - stage: Quality and Unit tests name: 'Build (without animation)' + before_script: npx @alfresco/adf-cli update-commit-sha --pointer "HEAD" --pathPackage "$(pwd)" 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" cache: false diff --git a/package.json b/package.json index b19de1a5a..ba5c80ead 100644 --- a/package.json +++ b/package.json @@ -8,11 +8,11 @@ "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: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.shared": "npm run update-commit-sha -- -gnu && ng build aca-shared", + "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": "ng build aca-shared", "build.aos": "npm run build:aos-extension", - "build.extensions": "npm run update-commit-sha -- -gnu && 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.extensions": "npm run build.shared && npm run build.aos", + "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", "test": "ng test app --code-coverage", @@ -27,8 +27,7 @@ "e2e:docker": "./start.sh && npm run e2e && ./start.sh -d", "spellcheck": "cspell '{src,e2e,projects}/**/*.ts'", "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", - "update-commit-sha": "./scripts/update-commit-sha.sh" + "validate-config": "ajv validate -s ./node_modules/@alfresco/adf-core/app.config.schema.json -d ./src/app.config.json --errors=text --verbose" }, "private": true, "dependencies": { diff --git a/scripts/update-commit-sha.sh b/scripts/update-commit-sha.sh deleted file mode 100755 index 1a699fe63..000000000 --- a/scripts/update-commit-sha.sh +++ /dev/null @@ -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 -