2525 - UT3_USER=ut3_user
2626 - UT3_USER_PASSWORD=ut3
2727 - UT3_TABLESPACE=users
28+ # Environment for building a release
29+ - CURRENT_BRANCH=${TRAVIS_BRANCH}
30+ - UTPLSQL_REPO="utPLSQL/utPLSQL"
31+ - UTPLSQL_BUILD_NO="${TRAVIS_BUILD_NUMBER:-0}"
32+ - UTPLSQL_VERSION_PLACEHOLDER='utPLSQL - Version'
33+ - UTPLSQL_VERSION=$(. .travis/get_project_version.sh)
34+ - UTPLSQL_BUILD_VERSION=$(. .travis/get_project_build_version.sh)
35+ - UTPLSQL_SOURCES_DIR='source'
36+ - UTPLSQL_BUILD_USER_NAME="Travis CI"
2837 # Target Branch and Directory for Deployment of Docs
2938 - PAGES_TARGET_BRANCH="gh-pages"
3039 - PAGES_VERSION_BASE="version3"
@@ -48,27 +57,39 @@ install:
4857 - bash .travis/install_sqlcl.sh
4958 - sudo mkdir -p /dev/pdbs
5059 - sudo chmod -R 777 /dev/pdbs
51- - bash .travis/start_db.sh
60+ - if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/start_db.sh; fi
61+
62+ before_script :
63+ # The update_project_version is done before deployment to validate that the change of project files does not break installation
64+ - bash .travis/update_project_version.sh
65+ -
git config --global user.email "[email protected] " 66+ - git config --global user.name "${UTPLSQL_BUILD_USER_NAME}"
67+ - git remote rm origin
68+ - git remote add origin https://${github_api_token}@github.com/${UTPLSQL_REPO}
5269
5370script :
54- - bash .travis/install.sh
55- - bash .travis/run_examples_and_tests.sh
56- # - bash .travis/run_test_as_user.sh
57- # - bash .travis/build_docs.sh
58- # - bash .travis/push_docs_to_gh_pages.sh
59- - sonar-scanner
60- - bash .travis/coveralls_uploader.sh
71+ - if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/install.sh; fi
72+ - if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/run_examples_and_tests.sh; fi
73+ - if [ "${TRAVIS_TAG}" = "" ]; then sonar-scanner; fi
74+ - if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/coveralls_uploader.sh; fi
75+ - bash .travis/build_docs.sh
76+ - if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/push_release_version.sh; fi
77+
78+ before_deploy :
79+ - bash .travis/build_release_archive.sh
6180
6281deploy :
6382 provider : releases
6483 api_key : $github_api_token
6584 file :
66- - utPLSQL$TRAVIS_TAG .zip
67- - utPLSQL$TRAVIS_TAG .tar.gz
85+ - utPLSQL${UTPLSQL_BUILD_VERSION} .zip
86+ - utPLSQL${UTPLSQL_BUILD_VERSION} .tar.gz
6887 skip_cleanup : true
6988 on :
70- repo : utPLSQL/utPLSQL
89+ repo : ${UTPLSQL_REPO}
7190 tags : true
91+ # when building from a release tag, use only first job "#xxx.1" to publish artifacts
92+ condition : " ${TRAVIS_JOB_NUMBER} =~ \\ .1$"
7293
7394notifications :
7495 slack : utplsql:oiMuXO95TvKeAUENuDt4cPrB
0 commit comments