mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
parent
9c165b2307
commit
672891e21b
26
.travis.yml
26
.travis.yml
@ -41,19 +41,20 @@ branches:
|
|||||||
|
|
||||||
stages:
|
stages:
|
||||||
- name: Setup
|
- name: Setup
|
||||||
if: branch != master AND (type = cron || type = pull_request) AND tag IS blank
|
|
||||||
- name: "Build lib"
|
- name: "Build lib"
|
||||||
if: branch != master AND (type = cron || type = pull_request) AND tag IS blank
|
if: tag IS blank
|
||||||
- name: "Check bundle"
|
- name: "Check bundle"
|
||||||
if: branch != master AND type = cron AND tag IS blank
|
if: type = push AND tag IS blank
|
||||||
- name: "Trigger Alpha ADF child build"
|
- name: "Trigger Alpha ADF child build"
|
||||||
if: branch = develop AND type = cron
|
if: branch = develop AND type = cron
|
||||||
- name: "Build"
|
- name: "Build Demo shell and Unit test Lib"
|
||||||
if: branch != master AND (type = cron || type = pull_request) AND tag IS blank
|
if: branch != master AND tag IS blank
|
||||||
- name: "e2e Test"
|
- name: "e2e Test"
|
||||||
if: branch != master AND (type = cron || type = pull_request) AND tag IS blank
|
if: branch != master AND tag IS blank
|
||||||
- name: "Release tag"
|
- name: "Release tag"
|
||||||
if: branch = master
|
if: branch = master
|
||||||
|
- name: "Deprecate develop builds"
|
||||||
|
if: branch = master
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
chrome: stable
|
chrome: stable
|
||||||
@ -95,7 +96,7 @@ jobs:
|
|||||||
workspaces:
|
workspaces:
|
||||||
use: node_modules_cache
|
use: node_modules_cache
|
||||||
|
|
||||||
- stage: "Build"
|
- stage: "Build Demo shell and Unit test Lib"
|
||||||
name: "Demo Shell :Build && dockerize"
|
name: "Demo Shell :Build && dockerize"
|
||||||
script:
|
script:
|
||||||
# Build Demo shell for production docker"
|
# Build Demo shell for production docker"
|
||||||
@ -109,25 +110,25 @@ jobs:
|
|||||||
use:
|
use:
|
||||||
- built_libs_cache
|
- built_libs_cache
|
||||||
|
|
||||||
- stage: "Build"
|
- stage: "Build Demo shell and Unit test Lib"
|
||||||
name: "content::unit"
|
name: "content::unit"
|
||||||
script: ./scripts/travis/unit-test/content.sh
|
script: ./scripts/travis/unit-test/content.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
use: built_libs_cache
|
use: built_libs_cache
|
||||||
|
|
||||||
- stage: "Build"
|
- stage: "Build Demo shell and Unit test Lib"
|
||||||
name: "core-extension::unit"
|
name: "core-extension::unit"
|
||||||
script: ./scripts/travis/unit-test/core-extension.sh
|
script: ./scripts/travis/unit-test/core-extension.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
use: built_libs_cache
|
use: built_libs_cache
|
||||||
|
|
||||||
- stage: "Build"
|
- stage: "Build Demo shell and Unit test Lib"
|
||||||
name: "process-insights::unit"
|
name: "process-insights::unit"
|
||||||
script: ./scripts/travis/unit-test/process.sh
|
script: ./scripts/travis/unit-test/process.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
use: built_libs_cache
|
use: built_libs_cache
|
||||||
|
|
||||||
- stage: "Build"
|
- stage: "Build Demo shell and Unit test Lib"
|
||||||
name: "process-cloud::unit"
|
name: "process-cloud::unit"
|
||||||
script: ./scripts/travis/unit-test/process-cloud.sh
|
script: ./scripts/travis/unit-test/process-cloud.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
@ -142,6 +143,9 @@ jobs:
|
|||||||
- stage: "Release tag"
|
- stage: "Release tag"
|
||||||
script: ./scripts/travis/release/git-tag.sh
|
script: ./scripts/travis/release/git-tag.sh
|
||||||
|
|
||||||
|
- stage: "Deprecate develop builds"
|
||||||
|
script: ./scripts/travis/release/deprecate-develop-build.sh -v ${ADF_VERSION}
|
||||||
|
|
||||||
- stage: "e2e Test"
|
- stage: "e2e Test"
|
||||||
name: "Core"
|
name: "Core"
|
||||||
before_script:
|
before_script:
|
||||||
|
68
scripts/travis/release/deprecate-develop-build.sh
Executable file
68
scripts/travis/release/deprecate-develop-build.sh
Executable file
@ -0,0 +1,68 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
eval VERSION=""
|
||||||
|
|
||||||
|
eval projects=( "adf-core"
|
||||||
|
"adf-insights"
|
||||||
|
"adf-content-services"
|
||||||
|
"adf-extensions"
|
||||||
|
"adf-testing"
|
||||||
|
"adf-process-services"
|
||||||
|
"adf-process-services-cloud" )
|
||||||
|
|
||||||
|
show_help() {
|
||||||
|
echo "Usage: deprecate-develop-build.sh"
|
||||||
|
echo "-v or -version to check -v 1.4.0 "
|
||||||
|
echo ""
|
||||||
|
}
|
||||||
|
|
||||||
|
set_npm_registry() {
|
||||||
|
npm set registry https://registry.npmjs.org/
|
||||||
|
}
|
||||||
|
|
||||||
|
version() {
|
||||||
|
if [[ $1 == "" ]];
|
||||||
|
then
|
||||||
|
echo "You need to add a version"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
VERSION=$1
|
||||||
|
}
|
||||||
|
|
||||||
|
while [[ $1 == -* ]]; do
|
||||||
|
case "$1" in
|
||||||
|
-h|--help|-\?) show_help; exit 0;;
|
||||||
|
-v|--version) version $2; shift 2;;
|
||||||
|
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
if [[ $VERSION == "" ]];
|
||||||
|
then
|
||||||
|
echo "You need to add a version"
|
||||||
|
fi
|
||||||
|
|
||||||
|
for PACKAGE in ${projects[@]}
|
||||||
|
do
|
||||||
|
echo "@alfresco/$PACKAGE"
|
||||||
|
|
||||||
|
for VERSION_TO_DEPRECATE in $(npm view "@alfresco/$PACKAGE" versions --json | jq -r '.[] | select( . | contains("-")) | select( . | contains("'$VERSION'"))')
|
||||||
|
do
|
||||||
|
deprecated=$(npm view "@alfresco/$PACKAGE@$VERSION_TO_DEPRECATE" -json | jq '.deprecated')
|
||||||
|
|
||||||
|
if [[ $deprecated != null ]];
|
||||||
|
then
|
||||||
|
echo "Already deprecated @alfresco/$PACKAGE@$VERSION_TO_DEPRECATE"
|
||||||
|
else
|
||||||
|
echo "Deprecate alpha/beta version @alfresco/$PACKAGE@$VERSION_TO_DEPRECATE"
|
||||||
|
npm deprecate "@alfresco/$PACKAGE@$VERSION_TO_DEPRECATE" "Upgrade to @latest or $VERSION"
|
||||||
|
fi
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
done
|
||||||
|
|
@ -35,8 +35,6 @@ async function main() {
|
|||||||
.option('-title, --title [type]', 'title')
|
.option('-title, --title [type]', 'title')
|
||||||
.parse(process.argv);
|
.parse(process.argv);
|
||||||
|
|
||||||
console.log('process.argv ', program);
|
|
||||||
|
|
||||||
const { token, title, head, repo } = program,
|
const { token, title, head, repo } = program,
|
||||||
prCreator = new PrCreator(ORGANISATION, repo, token);
|
prCreator = new PrCreator(ORGANISATION, repo, token);
|
||||||
|
|
||||||
@ -49,10 +47,15 @@ async function main() {
|
|||||||
|
|
||||||
main()
|
main()
|
||||||
.then(prNumber => {
|
.then(prNumber => {
|
||||||
|
console.log("======= PR Created =========");
|
||||||
|
|
||||||
console.log(prNumber)
|
console.log(prNumber)
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error(error);
|
|
||||||
|
console.error("======= Impossible create PR =========");
|
||||||
|
console.error(error.response.status);
|
||||||
|
console.error(error.response.statusText);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user