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

Skip to content

Commit 40f190a

Browse files
committed
Merge remote-tracking branch 'origin/release/v3.1.12'
2 parents 24cde95 + c677c5c commit 40f190a

164 files changed

Lines changed: 3949 additions & 1143 deletions

File tree

Some content is hidden

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

.gitattributes

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1+
.github export-ignore
2+
.idea export-ignore
3+
development export-ignore
4+
test export-ignore
15
.gitattributes export-ignore
26
.gitignore export-ignore
37
.gitmodules export-ignore
4-
.travis.yml export-ignore
58
mkdocs.yml export-ignore
6-
.travis export-ignore
79
sonar-project.properties export-ignore
8-
tests export-ignore
9-
development export-ignore
10-
node_modules export-ignore
11-
^docs/* linguist-documentation
10+
^docs/** linguist-documentation
1211
*.pkb linguist-language=PLSQL
1312
*.pks linguist-language=PLSQL
1413
*.sql linguist-language=PLSQL
1514
*.tpb linguist-language=PLSQL
1615
*.tps linguist-language=PLSQL
16+
*.sh text eol=lf
Lines changed: 1 addition & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -2,69 +2,7 @@
22

33
set -ev
44
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
5-
cd ${SCRIPT_DIR}/../source
6-
7-
INSTALL_FILE="install_headless_with_trigger.sql"
8-
if [[ ! -f "${INSTALL_FILE}" ]]; then
9-
INSTALL_FILE="install_headless.sql"
10-
fi
11-
12-
#install core of utplsql
13-
time "$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
14-
whenever sqlerror exit failure rollback
15-
set feedback off
16-
set verify off
17-
18-
--alter session set plsql_warnings = 'ENABLE:ALL', 'DISABLE:(5004,5018,6000,6001,6003,6009,6010,7206)';
19-
alter session set plsql_optimize_level=0;
20-
@${INSTALL_FILE} $UT3_DEVELOP_SCHEMA $UT3_DEVELOP_SCHEMA_PASSWORD
21-
SQL
22-
23-
#Run this step only on second child job (12.1 - at it's fastest)
24-
if [[ "${JOB_NUMBER}" =~ \.2$ ]]; then
25-
26-
#check code-style for errors
27-
time "$SQLCLI" $UT3_DEVELOP_SCHEMA/$UT3_DEVELOP_SCHEMA_PASSWORD@//$CONNECTION_STR @../development/utplsql_style_check.sql
28-
29-
#test install/uninstall process
30-
time "$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
31-
set feedback off
32-
set verify off
33-
whenever sqlerror exit failure rollback
34-
35-
@uninstall_all.sql $UT3_DEVELOP_SCHEMA
36-
whenever sqlerror exit failure rollback
37-
declare
38-
v_leftover_objects_count integer;
39-
begin
40-
select sum(cnt)
41-
into v_leftover_objects_count
42-
from (
43-
select count(1) cnt from dba_objects where owner = '$UT3_DEVELOP_SCHEMA'
44-
where object_name not like 'PLSQL_PROFILER%' and object_name not like 'DBMSPCC_%'
45-
union all
46-
select count(1) cnt from dba_synonyms where table_owner = '$UT3_DEVELOP_SCHEMA'
47-
where table_name not like 'PLSQL_PROFILER%' and table_name not like 'DBMSPCC_%'
48-
);
49-
if v_leftover_objects_count > 0 then
50-
raise_application_error(-20000, 'Not all objects were successfully uninstalled - leftover objects count='||v_leftover_objects_count);
51-
end if;
52-
end;
53-
/
54-
SQL
55-
56-
time "$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
57-
set feedback off
58-
set verify off
59-
60-
alter session set plsql_optimize_level=0;
61-
@install.sql $UT3_DEVELOP_SCHEMA
62-
@install_ddl_trigger.sql $UT3_DEVELOP_SCHEMA
63-
@create_synonyms_and_grants_for_public.sql $UT3_DEVELOP_SCHEMA
64-
SQL
65-
66-
fi
67-
5+
cd ${SCRIPT_DIR}/../../source
686

697
time "$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
708
set feedback off
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

.github/scripts/install.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
set -ev
4+
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
5+
cd ${SCRIPT_DIR}/../../source
6+
7+
INSTALL_FILE="install_headless_with_trigger.sql"
8+
if [[ ! -f "${INSTALL_FILE}" ]]; then
9+
INSTALL_FILE="install_headless.sql"
10+
fi
11+
12+
#install core of utplsql
13+
time "$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
14+
whenever sqlerror exit failure rollback
15+
set feedback off
16+
set verify off
17+
18+
--alter session set plsql_warnings = 'ENABLE:ALL', 'DISABLE:(5004,5018,6000,6001,6003,6009,6010,7206)';
19+
alter session set plsql_optimize_level=0;
20+
@${INSTALL_FILE} $UT3_DEVELOP_SCHEMA $UT3_DEVELOP_SCHEMA_PASSWORD
21+
SQL

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -ev
44
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
5-
cd ${SCRIPT_DIR}/../${UTPLSQL_DIR}/source
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -ev
44
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
5-
cd ${SCRIPT_DIR}/../examples
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

0 commit comments

Comments
 (0)