mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
simplify release tasks
This commit is contained in:
parent
270020f561
commit
5edab26f8e
14
.travis.yml
14
.travis.yml
@ -21,9 +21,7 @@ branches:
|
|||||||
- /.*greenkeeper.*/
|
- /.*greenkeeper.*/
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- name: Lint & Build Dist
|
- name: Lint & Build Dist & Release
|
||||||
- name: Npm Release
|
|
||||||
if: (type = push OR type = cron) AND tag IS blank
|
|
||||||
- name: Update Rancher
|
- name: Update Rancher
|
||||||
if: (type = push AND tag IS blank) OR type = api
|
if: (type = push AND tag IS blank) OR type = api
|
||||||
- name: Deploy PR
|
- name: Deploy PR
|
||||||
@ -53,22 +51,16 @@ services:
|
|||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
# Run Only for any PR
|
# Run Only for any PR
|
||||||
- stage: Lint & Build Dist
|
- stage: Lint & Build Dist & Release
|
||||||
name: Build
|
name: Build
|
||||||
script:
|
script:
|
||||||
- ./scripts/travis/build/build.sh
|
- ./scripts/travis/build/build.sh
|
||||||
- ./scripts/lint.sh
|
- ./scripts/lint.sh
|
||||||
|
- ./scripts/travis/release/release-npm.sh
|
||||||
after_success:
|
after_success:
|
||||||
- ./scripts/ci/utils/artifact-to-s3.sh -a ./dist/demo-shell -o "$S3_DBP_FOLDER/alfresco-demoshell.tar.bz2"
|
- ./scripts/ci/utils/artifact-to-s3.sh -a ./dist/demo-shell -o "$S3_DBP_FOLDER/alfresco-demoshell.tar.bz2"
|
||||||
- ./scripts/ci/utils/artifact-to-s3.sh -a ./lib/dist -o "$S3_DBP_FOLDER/alfresco-libs.tar.bz2"
|
- ./scripts/ci/utils/artifact-to-s3.sh -a ./lib/dist -o "$S3_DBP_FOLDER/alfresco-libs.tar.bz2"
|
||||||
|
|
||||||
# Run Only on develop and master
|
|
||||||
- stage: Npm Release
|
|
||||||
name: Npm Release
|
|
||||||
before_script: ./scripts/ci/utils/artifact-from-s3.sh -a "$S3_DBP_FOLDER/alfresco-libs.tar.bz2" -o "./lib/dist"
|
|
||||||
script:
|
|
||||||
- ./scripts/travis/release/release-npm.sh
|
|
||||||
|
|
||||||
- stage: Unit test
|
- stage: Unit test
|
||||||
name: Unit test content
|
name: Unit test content
|
||||||
script: ./scripts/travis/unit-test/content.sh
|
script: ./scripts/travis/unit-test/content.sh
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
"01": "echo -------------------------------------------- Build Lib -----------------------------------------------",
|
"01": "echo -------------------------------------------- Build Lib -----------------------------------------------",
|
||||||
"01s": "",
|
"01s": "",
|
||||||
"unit-test": "concurrently \"ng test content-services --watch=false\" \"ng test process-services --watch=false\" \"ng test core --watch=false\" \"ng test extensions --watch=false\" \"ng test insights --watch=false\" \"ng test process-services-cloud --watch=false\" ",
|
"unit-test": "concurrently \"ng test content-services --watch=false\" \"ng test process-services --watch=false\" \"ng test core --watch=false\" \"ng test extensions --watch=false\" \"ng test insights --watch=false\" \"ng test process-services-cloud --watch=false\" ",
|
||||||
"prepublishOnly": "npm run build-lib",
|
|
||||||
"build-lib": "./scripts/build/build-all-lib.sh",
|
"build-lib": "./scripts/build/build-all-lib.sh",
|
||||||
"affected:libs": "nx affected:libs",
|
"affected:libs": "nx affected:libs",
|
||||||
"inspect.bundle": "ng build demoshell --prod --stats-json && npx webpack-bundle-analyzer dist/demo-shell/stats-es2015.json",
|
"inspect.bundle": "ng build demoshell --prod --stats-json && npx webpack-bundle-analyzer dist/demo-shell/stats-es2015.json",
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
eval NAME=
|
|
||||||
|
|
||||||
show_help() {
|
|
||||||
echo "Usage: test-dist.sh"
|
|
||||||
echo ""
|
|
||||||
echo "-n or --name pr name"
|
|
||||||
}
|
|
||||||
|
|
||||||
name(){
|
|
||||||
NAME="/$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
while [[ $1 == -* ]]; do
|
|
||||||
case "$1" in
|
|
||||||
-h|--help|-\?) show_help; exit 0;;
|
|
||||||
-n|--name) name $2; shift 2;;
|
|
||||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 0;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "====== Install lib ===== "
|
|
||||||
|
|
||||||
cd $DIR/../
|
|
||||||
npm install
|
|
||||||
|
|
||||||
echo "====== Install JS-API alpha ===== "
|
|
||||||
|
|
||||||
npm install alfresco-js-api@alpha
|
|
||||||
|
|
||||||
echo "====== Build ADF ===== "
|
|
||||||
|
|
||||||
npm run build-lib || exit 1
|
|
||||||
|
|
||||||
echo "====== Build dist demo shell ===== "
|
|
||||||
|
|
||||||
npm run server-versions
|
|
||||||
ng build dist --base-href=$NAME/ --output-path dist/demo-shell/$NAME || exit 1
|
|
||||||
|
|
||||||
echo "====== e2e test ===== "
|
|
||||||
|
|
||||||
npm run e2e || exit 1
|
|
@ -24,8 +24,7 @@ then
|
|||||||
|
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
nx affected --exclude=cli --target=build --all || exit 1;
|
./scripts/build/build-all-lib.sh
|
||||||
./scripts/build/build-cli.sh || exit 1;
|
|
||||||
else
|
else
|
||||||
echo "====== Update the package.json with latest JS-API/CLI deps ====="
|
echo "====== Update the package.json with latest JS-API/CLI deps ====="
|
||||||
npx @alfresco/adf-cli@alpha update-version --alpha --pathPackage "$(pwd)"
|
npx @alfresco/adf-cli@alpha update-version --alpha --pathPackage "$(pwd)"
|
||||||
|
@ -15,7 +15,9 @@ then
|
|||||||
TAG_NPM=beta
|
TAG_NPM=beta
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi;
|
|
||||||
|
|
||||||
echo "Publishing on npm with tag $TAG_NPM"
|
echo "Publishing on npm with tag $TAG_NPM"
|
||||||
npx @alfresco/adf-cli npm-publish --npmRegistry $NPM_REGISTRY_ADDRESS --tokenRegistry $NPM_REGISTRY_TOKEN --tag $TAG_NPM --pathProject "$(pwd)"
|
npx @alfresco/adf-cli npm-publish --npmRegistry $NPM_REGISTRY_ADDRESS --tokenRegistry $NPM_REGISTRY_TOKEN --tag $TAG_NPM --pathProject "$(pwd)"
|
||||||
|
else
|
||||||
|
echo "PR Not need to release in NPM"
|
||||||
|
fi;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user