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

Skip to content

Commit e913547

Browse files
committed
Merge branch 'develop' of https://github.com/utPLSQL/utPLSQL into feature/remove_old_builds
2 parents 098aca2 + 8de19cc commit e913547

44 files changed

Lines changed: 397 additions & 141 deletions

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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ test export-ignore
66
.gitignore export-ignore
77
.gitmodules export-ignore
88
mkdocs.yml export-ignore
9+
BUILD_NO export-ignore
10+
mkdocs_offline.yml export-ignore
911
sonar-project.properties export-ignore
1012
^docs/** linguist-documentation
1113
*.pkb linguist-language=PLSQL

.github/scripts/get_project_build_version.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
#!/usr/bin/env bash
2-
3-
#When building a new version from a release branch, the version is taken from release branch name
4-
if [[ "${CI_ACTION_REF_NAME}" =~ ^release/v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
5-
version=${CI_ACTION_REF_NAME#release\/}
6-
else
7-
#Otherwise, version is taken from the VERSION file
8-
version=`cat VERSION`
9-
#When on develop branch, add "-develop" to the version text
10-
if [[ "${CI_ACTION_REF_NAME}" == "develop" ]]; then
2+
version=`cat VERSION`
3+
#When on develop branch, add "-develop" to the version text
4+
if [[ "${CI_ACTION_REF_NAME}" == "develop" ]]; then
115
version=`sed -E "s/(v?[0-9]+\.[0-9]+\.[0-9]+).*/\1-develop/" <<< "${version}"`
12-
fi
136
fi
147
echo ${version}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
build_no=$(cat BUILD_NO)
4+
version=${CI_ACTION_REF_NAME}
5+
6+
echo "UTPLSQL_BUILD_NO=${build_no}" >> $GITHUB_ENV
7+
echo "UTPLSQL_VERSION=${version}" >> $GITHUB_ENV
8+
echo UTPLSQL_BUILD_VERSION=$(echo ${version} | sed -E "s/(v?[0-9]+\.)([0-9]+\.)([0-9]+)(-.*)?/\1\2\3\.${build_no}\4/") >> $GITHUB_ENV
9+
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#!/bin/bash
22

3-
UTPLSQL_BUILD_NO=$( expr ${GITHUB_RUN_NUMBER} + ${UTPLSQL_BUILD_NO_OFFSET} )
4-
UTPLSQL_VERSION=$(.github/scripts/get_project_version.sh)
3+
build_no=$( expr ${GITHUB_RUN_NUMBER} + ${UTPLSQL_BUILD_NO_OFFSET} )
4+
version=$(.github/scripts/get_project_version.sh)
55

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
6+
echo "UTPLSQL_BUILD_NO=${build_no}" >> $GITHUB_ENV
7+
echo "UTPLSQL_VERSION=${version}" >> $GITHUB_ENV
8+
echo UTPLSQL_BUILD_VERSION=$(echo ${version} | sed -E "s/(v?[0-9]+\.)([0-9]+\.)([0-9]+)(-.*)?/\1\2\3\.${build_no}\4/") >> $GITHUB_ENV

.github/scripts/update_project_version.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ sed -i -r "s/(sonar\.projectVersion=).*?/\1${UTPLSQL_VERSION}/" sonar-project.pr
1616

1717
echo Update VERSION file
1818
echo ${UTPLSQL_VERSION} > VERSION
19+
echo ${UTPLSQL_BUILD_NO} > BUILD_NO
1920

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ jobs:
243243
- name: Push version update to repository
244244
id: push-version-number-update
245245
run: |
246-
git add sonar-project.properties VERSION source/* docs/*
246+
git add sonar-project.properties VERSION BUILD_NO source/* docs/*
247247
git commit -m 'Updated project version after build [skip ci]'
248248
git push --quiet origin HEAD:${CI_ACTION_REF_NAME}
249249

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- uses: FranzDiebold/[email protected] #https://github.com/marketplace/actions/github-environment-variables-action
2727

2828
- name: Set build version number env variables
29-
run: .github/scripts/set_version_numbers_env.sh
29+
run: .github/scripts/set_release_version_numbers_env.sh
3030

3131
- name: Update project version & build number in source code and documentation
3232
run: .github/scripts/update_project_version.sh

BUILD_NO

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4206

CONTRIBUTING.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ To get started with development, follow the below steps.
5757

5858
_If you're using Windows, run the shell scripts using `GIT bash` - Windows-based bash command line._
5959

60-
**Caution**: If you are using jetBrains DataGrip, don't use the ingegrated console to run the shell scripts (not even with GIT bash configured). It might disconnect from oracle randomly during script-run.
60+
**Caution**: If you are using jetBrains DataGrip, don't use the integrated console to run the shell scripts (not even with GIT bash configured). It might disconnect from oracle randomly during script-run.
6161

6262
### Clone your fork of utPLSQL git repository
6363

@@ -94,13 +94,13 @@ export ORACLE_PWD=oracle # Adjust your local SYS password
9494

9595
The below script is fetching latest release version from utPLSQL repository. Latest release version is used for self-testing.
9696
```bash
97-
development/refresh_sources.sh
97+
./development/refresh_sources.sh
9898
```
9999

100100
### Setup local database for utPLSQL development
101101

102102
```bash
103-
development/install.sh
103+
./development/install.sh
104104
```
105105

106106
### That's it
@@ -135,18 +135,18 @@ Whenever a new version of utPLSQL or a new version of utPLSQL-cli is available,
135135

136136
utPLSQL v3 unit tests are located in the `test` directory
137137

138-
Before you push any changes and create a pull request to the utPLSQL project repository, make sure that all of the tests are executing successfully in your local environment.
138+
Before you push any changes and create a pull request to the utPLSQL project repository, make sure that all the tests are executing successfully in your local environment.
139139

140-
Every new functionality needs to be documented by unit tests that cover both happy-path scenarios as well as edge-cases and exception paths.
140+
Every new functionality needs to be documented by unit tests that cover happy-path scenarios as well as edge-cases and exception paths.
141141

142142
> **Important notice:**
143143
> We do our best to keep utPLSQL covered with unit tests.
144144
> Lack of sufficient unit testing is a perfect reason for PR to be rejected.
145145
146146
To run a full suite of unit tests execute:
147147
```bash
148-
development/env.sh
149-
test/install_and_run_tests.sh
148+
. ./development/env.sh
149+
./test/install_and_run_tests.sh
150150
```
151151

152152
You can review the results of tests as well as see information about code coverage in `./coverage.html` file.
@@ -189,18 +189,17 @@ docker build --force-rm --no-cache --squash -t oracle/db-prebuilt .
189189

190190
Travis will use your Docker Hub credentials to pull the private images, and the following secure environment variables must be defined.
191191

192-
Variable | Description
193-
---------|------------
194-
**DOCKER_USER**<br />**DOCKER_PASSWORD** | _Your Docker Hub website credentials. They will be used to pull the private database images._
192+
| Variable | Description |
193+
|------------------------------------------|-----------------------------------------------------------------------------------------------|
194+
| **DOCKER_USER**<br />**DOCKER_PASSWORD** | _Your Docker Hub website credentials. They will be used to pull the private database images._ |
195195

196196
### SQLCL
197197

198198
Our build configuration uses SQLCL to run the scripts, and you need to configure a few additional secure environment variables. After the first build, the downloaded file will be cached.
199199

200-
Variable | Description
201-
---------|------------
202-
**ORACLE_OTN_USER<br />ORACLE_OTN_PASSWORD** | _Your Oracle website credentials. They will be used to download SQLCL._
203-
200+
| Variable | Description |
201+
|----------------------------------------------|-------------------------------------------------------------------------|
202+
| **ORACLE_OTN_USER<br />ORACLE_OTN_PASSWORD** | _Your Oracle website credentials. They will be used to download SQLCL._ |
204203

205204
## New to GIT
206205

0 commit comments

Comments
 (0)