Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e23b7c2

Browse files
authored
Merge branch 'develop' into bag_fix
2 parents feb77d3 + e14739e commit e23b7c2

22 files changed

Lines changed: 135 additions & 82 deletions

.gitattributes

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,2 @@
1-
.gitattributes export-ignore
2-
.gitignore export-ignore
3-
.gitmodules export-ignore
4-
.travis.yml export-ignore
5-
mkdocs.yml export-ignore
6-
.travis export-ignore
7-
sonar-project.properties export-ignore
8-
^tests/* export-ignore
9-
^development/* export-ignore
10-
^docs/* linguist-documentation
1+
* export-ignore
2+
^docs/* linguist-documentation

.gitattributes.release

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.gitattributes export-ignore
2+
.gitignore export-ignore
3+
.gitmodules export-ignore
4+
.travis.yml export-ignore
5+
mkdocs.yml export-ignore
6+
.travis export-ignore
7+
sonar-project.properties export-ignore
8+
tests export-ignore
9+
development export-ignore
10+
node_modules export-ignore
11+
^docs/* linguist-documentation

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ pages/
1010
release/
1111
*.gz
1212
*.zip
13+
node_modules/

.travis.yml

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ env:
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"
@@ -35,7 +44,7 @@ env:
3544
matrix:
3645
- ORACLE_VERSION="12c-se-r1" CONNECTION_STR='127.0.0.1:1521/ORCLPDB1'
3746
- ORACLE_VERSION="11g-xe-r2" CONNECTION_STR='127.0.0.1:1521/XE' DOCKER_OPTIONS='--shm-size=1g'
38-
- ORACLE_VERSION="12c-se2-r2" CONNECTION_STR='127.0.0.1:1521/ORCLPDB1'
47+
- ORACLE_VERSION="12c-se2-r2-v2" CONNECTION_STR='127.0.0.1:1521/ORCLPDB1' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"
3948

4049
cache:
4150
pip: true
@@ -46,27 +55,41 @@ cache:
4655
install:
4756
- pip install mkdocs
4857
- bash .travis/install_sqlcl.sh
49-
- bash .travis/start_db.sh
58+
- sudo mkdir -p /dev/pdbs
59+
- sudo chmod -R 777 /dev/pdbs
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}
5069

5170
script:
52-
- bash .travis/install.sh
53-
- bash .travis/run_examples_and_tests.sh
54-
# - bash .travis/run_test_as_user.sh
55-
# - bash .travis/build_docs.sh
56-
# - bash .travis/push_docs_to_gh_pages.sh
57-
- sonar-scanner
58-
- 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
5980

6081
deploy:
6182
provider: releases
6283
api_key: $github_api_token
6384
file:
64-
- utPLSQL$TRAVIS_TAG.zip
65-
- utPLSQL$TRAVIS_TAG.tar.gz
85+
- utPLSQL${UTPLSQL_BUILD_VERSION}.zip
86+
- utPLSQL${UTPLSQL_BUILD_VERSION}.tar.gz
6687
skip_cleanup: true
6788
on:
68-
repo: utPLSQL/utPLSQL
89+
repo: ${UTPLSQL_REPO}
6990
tags: true
91+
# when building from a release tag, use only first job "#xxx.1" to publish artifacts
92+
condition: "${TRAVIS_JOB_NUMBER} =~ \\.1$"
7093

7194
notifications:
7295
slack: utplsql:oiMuXO95TvKeAUENuDt4cPrB

.travis/build_release_archive.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
mv -f .gitattributes.release .gitattributes
4+
git add .
5+
git commit -m "tmp commit for building a release archive"
6+
7+
git archive --prefix="utPLSQL${UTPLSQL_BUILD_VERSION}"/ -o "utPLSQL${UTPLSQL_BUILD_VERSION}".zip --format=zip HEAD
8+
git archive --prefix="utPLSQL${UTPLSQL_BUILD_VERSION}"/ -o "utPLSQL${UTPLSQL_BUILD_VERSION}".tar.gz --format=tar.gz HEAD
9+
10+

.travis/create_release.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

.travis/create_release_archive.sh

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
echo `sed -r "s/(v?[0-9]+\.)([0-9]+\.)([0-9]+)(-.*)/\1\2\3\.${UTPLSQL_BUILD_NO}\4/" <<< "${UTPLSQL_VERSION}"`

.travis/get_project_version.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
#If building a new version from a release branch - then version is taken from release branch name
3+
if [[ "${CURRENT_BRANCH}" =~ ^release/v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
4+
version=${CURRENT_BRANCH#release\/}
5+
elif [[ "${TRAVIS_TAG}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
6+
version=${TRAVIS_TAG}
7+
else
8+
version=`cat VERSION`
9+
fi
10+
echo ${version}

.travis/install_libraries.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)