Enzor/travis build (#2287)

* removing the directive to remove the node_modules folder

* publishing from travis

* beta and major gets pushed to the beta channel. only major get tagged to latest, in a different job
This commit is contained in:
Enzo Rivello
2017-09-04 17:51:46 +01:00
committed by Mario Romano
parent 11cadbb01f
commit 0ff268108f
3 changed files with 39 additions and 0 deletions

View File

@@ -38,6 +38,30 @@ script:
fi
fi
# jobs:
# include:
# - stage: Publish alpha to NPM
# before_install: skip
# install: skip
# script: skip
# deploy:
# provider: script
# script: (./scripts/update-version.sh -v $(./scripts/next_version.sh)-$(git rev-parse HEAD) -vj $(npm view alfresco-js-api@alpha version) -gnu) && (./scripts/npm-publish.sh -r $NPM_REGISTRY_ADDRESS -token $NPM_REGISTRY_TOKEN -t alpha --sleep 20 || exit 1;);
# on:
# branch: development
# skip_cleanup: true
# - stage: Publish beta to NPM
# before_install: skip
# install: skip
# script: skip
# deploy:
# provider: script
# script: (./scripts/update-version.sh -v $TRAVIS_TAG -gnu) && (./scripts/npm-publish.sh -r $NPM_REGISTRY_ADDRESS -token $NPM_REGISTRY_TOKEN -t beta --sleep 20 || exit 1;);
# on:
# tags: true
# skip_cleanup: true
# Send coverage data to codecov
after_success:
bash <(curl -s https://codecov.io/bash) -X gcov

6
scripts/last_beta_version.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
ADF_VERSION=$(npm view ng2-alfresco-core@beta version)
BETA_VERSION=( ${ADF_VERSION//-/ } )
echo ${BETA_VERSION[0]}

9
scripts/next_version.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
ADF_VERSION=$(npm view ng2-alfresco-core version)
NEXT_VERSION=( ${ADF_VERSION//./ } )
((NEXT_VERSION[1]++))
NEXT_VERSION[2]=0
NEXT_VERSION="${NEXT_VERSION[0]}.${NEXT_VERSION[1]}.${NEXT_VERSION[2]}"
echo $NEXT_VERSION