Skip to content

Commit 66d92fc

Browse files
committed
Merge branch 'develop' into feature/rework_matcher
2 parents 7c01afb + e358037 commit 66d92fc

File tree

383 files changed

+2748
-2179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

383 files changed

+2748
-2179
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.travis.yml export-ignore
55
mkdocs.yml export-ignore
66
.travis export-ignore
7+
.github export-ignore
78
sonar-project.properties export-ignore
89
tests export-ignore
910
development export-ignore
File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env bash
22

33
#When building a new version from a release branch, the version is taken from release branch name
4-
if [[ "${CURRENT_BRANCH}" =~ ^release/v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
5-
version=${CURRENT_BRANCH#release\/}
4+
if [[ "${CI_ACTION_REF_NAME}" =~ ^release/v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
5+
version=${CI_ACTION_REF_NAME#release\/}
66
else
77
#Otherwise, version is taken from the VERSION file
88
version=`cat VERSION`
99
#When on develop branch, add "-develop" to the version text
10-
if [[ "${CURRENT_BRANCH}" == "develop" ]]; then
10+
if [[ "${CI_ACTION_REF_NAME}" == "develop" ]]; then
1111
version=`sed -E "s/(v?[0-9]+\.[0-9]+\.[0-9]+).*/\1-develop/" <<< "${version}"`
1212
fi
1313
fi
Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/bin/bash
22

3-
cd source
43
set -ev
4+
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
5+
cd ${SCRIPT_DIR}/../../source
56

67
INSTALL_FILE="install_headless_with_trigger.sql"
78
if [[ ! -f "${INSTALL_FILE}" ]]; then
@@ -19,8 +20,7 @@ alter session set plsql_optimize_level=0;
1920
@${INSTALL_FILE} $UT3_DEVELOP_SCHEMA $UT3_DEVELOP_SCHEMA_PASSWORD
2021
SQL
2122

22-
#Run this step only on second child job (12.1 - at it's fastest)
23-
if [[ "${TRAVIS_JOB_NUMBER}" =~ \.2$ ]]; then
23+
if [[ "${MATRIX_JOB_ID}" == 1 ]]; then
2424

2525
#check code-style for errors
2626
time "$SQLCLI" $UT3_DEVELOP_SCHEMA/$UT3_DEVELOP_SCHEMA_PASSWORD@//$CONNECTION_STR @../development/utplsql_style_check.sql
@@ -113,6 +113,25 @@ PROMPT Creating $UT3_USER - minimal privileges user for API testing
113113
create user $UT3_USER identified by "$UT3_USER_PASSWORD" default tablespace $UT3_TABLESPACE quota unlimited on $UT3_TABLESPACE;
114114
grant create session, create procedure, create type, create table to $UT3_USER;
115115
116+
PROMPT Grants for starting a debugging session from $UT3_USER
117+
grant debug connect session to $UT3_USER;
118+
grant debug any procedure to $UT3_USER;
119+
begin
120+
\$if dbms_db_version.version <= 11 \$then
121+
null; -- no addition action necessary
122+
\$else
123+
-- necessary on 12c or higher
124+
dbms_network_acl_admin.append_host_ace (
125+
host =>'*',
126+
ace => sys.xs\$ace_type(
127+
privilege_list => sys.xs\$name_list('JDWP') ,
128+
principal_name => '$UT3_USER',
129+
principal_type => sys.xs_acl.ptype_db
130+
)
131+
);
132+
\$end
133+
end;
134+
/
116135
117136
--------------------------------------------------------------------------------
118137
PROMPT Creating $UT3_TESTER_HELPER - provides functions to allow min grant test user setup tests.
@@ -128,7 +147,7 @@ PROMPT Grants for testing coverage outside of main $UT3_DEVELOP_SCHEMA schema.
128147
grant create any procedure, drop any procedure, execute any procedure, create any type, drop any type, execute any type, under any type,
129148
select any table, update any table, insert any table, delete any table, create any table, drop any table, alter any table,
130149
select any dictionary, create any synonym, drop any synonym,
131-
grant any object privilege, grant any privilege, create public synonym, drop public synonym
150+
grant any object privilege, grant any privilege, create public synonym, drop public synonym, create any trigger
132151
to $UT3_TESTER_HELPER;
133152
134153
grant create job to $UT3_TESTER_HELPER;

.travis/install_utplsql_release.sh renamed to .github/scripts/install_utplsql_release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

33
set -ev
4-
5-
cd $UTPLSQL_DIR/source
4+
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
5+
cd ${SCRIPT_DIR}/../../${UTPLSQL_DIR}/source
66

77
"$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<SQL
88
set serveroutput on
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
#!/bin/bash
2+
3+
# Based on `push_docs_to_gh_pages.sh`
4+
# Significant alterations
5+
# - Support for multiple copies of documentation,
6+
# - only clearing out develop
7+
# - index.md logging doc history
8+
9+
# How to run:
10+
# - From repository root .github/scripts/push_docs_to_gh_pages.sh
11+
12+
# Required files / directories (relative from repo root)
13+
# - File: "docs/index.md" with that contains develop docs
14+
15+
# Required ENV Variables
16+
LATEST_DOCS_BRANCH="develop"
17+
GITHUB_IO_REPO='utPLSQL/utPLSQL.github.io'
18+
GITHUB_IO_BRANCH='main'
19+
DOCS_DIR='../../docs/.'
20+
21+
# ENV Variable checks are to help with configuration troubleshooting, they silently exit with unique message.
22+
# Anyone one of them not set can be used to turn off this functionality.
23+
24+
# If a version of the project is not defined
25+
[[ -n "${UTPLSQL_VERSION}" ]] || { echo "variable UTPLSQL_VERSION is not defines or missing value"; exit 1; }
26+
# Fail if the markdown documentation is not present.
27+
[[ -f ./docs/index.md ]] || { echo "file docs/index.md not found"; exit 1; }
28+
29+
# Store latest commit SHA to be used when committing and pushing to github.io repo
30+
SHA=`git rev-parse --verify HEAD`
31+
32+
# clone the repository and switch to GITHUB_IO_BRANCH branch
33+
mkdir pages
34+
cd ./pages
35+
git clone --depth 1 https://${API_TOKEN_GITHUB}@github.com/${GITHUB_IO_REPO} -b ${GITHUB_IO_BRANCH} .
36+
37+
mkdir -p utPLSQL
38+
cd ./utPLSQL
39+
#clear out develop documentation directory and copy docs contents to it.
40+
echo "updating 'develop' documentation directory"
41+
mkdir -p ./develop
42+
rm -rf ./develop/**./* || exit 0
43+
cp -a ${DOCS_DIR} ./develop
44+
45+
# If a Tagged Build then copy to it's own directory as well and to the 'latest' release directory
46+
if [ "${GITHUB_REF_TYPE}" == "tag" ]; then
47+
echo "Creating directory ./${UTPLSQL_VERSION}"
48+
mkdir -p ./${UTPLSQL_VERSION}
49+
rm -rf ./${UTPLSQL_VERSION}/**./* || exit 0
50+
cp -a ${DOCS_DIR} ./${UTPLSQL_VERSION}
51+
echo "Populating 'latest' directory"
52+
mkdir -p ./latest
53+
rm -rf ./latest/**./* || exit 0
54+
cp -a ${DOCS_DIR} ./latest
55+
fi
56+
# Stage changes for commit
57+
git add .
58+
59+
#Check if there are doc changes, if none exit the script
60+
if [[ -z `git diff HEAD --exit-code` ]]; then
61+
echo "No changes to docs detected."
62+
exit 0
63+
fi
64+
#Changes where detected, so we need to update the version log.
65+
now=$(date +"%d %b %Y - %r")
66+
if [ ! -f index.md ]; then
67+
echo "---" >>index.md
68+
echo "layout: default" >>index.md
69+
echo "---" >>index.md
70+
echo "<!-- Auto generated from .github/scripts/push_docs_to_github_io.sh -->" >>index.md
71+
echo "# Documentation versions" >>index.md
72+
echo "" >>index.md
73+
echo "" >>index.md #- 7th line - placeholder for latest release doc
74+
echo "" >>index.md #- 8th line - placeholder for develop branch doc
75+
echo "" >>index.md
76+
echo "## Released Version Doc History" >>index.md
77+
echo "" >>index.md
78+
fi
79+
#If build running on a TAG - it's a new release - need to add it to documentation
80+
if [ "${GITHUB_REF_TYPE}" == "tag" ]; then
81+
sed -i '7s@.*@'" - [Latest ${CI_ACTION_REF_NAME} documentation](latest/) - Created $now"'@' index.md
82+
#add entry to the top of version history (line end of file - ## Released Version Doc History
83+
sed -i '12i'" - [${CI_ACTION_REF_NAME} documentation](${UTPLSQL_VERSION}/) - Created $now" index.md
84+
fi
85+
#replace 4th line in log
86+
sed -i '8s@.*@'" - [Latest development version](develop/) - Created $now"'@' index.md
87+
#Add and Commit the changes back to pages repo.
88+
git add .
89+
git commit -m "Deploy to gh-pages branch: base commit ${SHA}"
90+
# Now that we're all set up, we can push.
91+
git push --quiet origin HEAD:${GITHUB_IO_BRANCH}
92+
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

3-
cd "$(dirname "$(readlink -f "$0")")"/../examples
4-
53
set -ev
4+
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
5+
cd ${SCRIPT_DIR}/../../examples
66

77
"$SQLCLI" $UT3_DEVELOP_SCHEMA/$UT3_DEVELOP_SCHEMA_PASSWORD@//$CONNECTION_STR <<SQL
88
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
UTPLSQL_BUILD_NO=$( expr ${GITHUB_RUN_NUMBER} + ${UTPLSQL_BUILD_NO_OFFSET} )
4+
UTPLSQL_VERSION=$(.github/scripts/get_project_version.sh)
5+
6+
echo "UTPLSQL_BUILD_NO=${UTPLSQL_BUILD_NO}" >> $GITHUB_ENV
7+
echo "UTPLSQL_VERSION=${UTPLSQL_VERSION}" >> $GITHUB_ENV
8+
echo UTPLSQL_BUILD_VERSION=$(echo ${UTPLSQL_VERSION} | sed -E "s/(v?[0-9]+\.)([0-9]+\.)([0-9]+)(-.*)?/\1\2\3\.${UTPLSQL_BUILD_NO}\4/") >> $GITHUB_ENV
9+
10+
echo "CURRENT_BRANCH=${CI_ACTION_REF_NAME}" >> $GITHUB_ENV
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
UTPLSQL_VERSION_PATTERN="v?([0-9]+\.){3}[0-9]+[^']*"
44

5-
echo Current branch is "${CURRENT_BRANCH}"
5+
echo Current branch is "${CI_ACTION_REF_NAME}"
66

77
echo Update version in project source files
8-
find ${UTPLSQL_SOURCES_DIR} -type f -name '*' -exec sed -i -r "s/${UTPLSQL_VERSION_PATTERN}/${UTPLSQL_BUILD_VERSION}/" {} \;
8+
find source -type f -name '*' -exec sed -i -r "s/${UTPLSQL_VERSION_PATTERN}/${UTPLSQL_BUILD_VERSION}/" {} \;
99
echo Source files updated with version tag: ${UTPLSQL_BUILD_VERSION}
1010

1111
echo Update version in documentation files

0 commit comments

Comments
 (0)