Hey devs, here are some notes that may be of use to you!
Besides these notes, the contributions guide also has information that might be useful.
- Download the latest release or clone the repository.
- Unzip and open the folder on a command-line terminal
- Build with Maven
mvn -Dmaven.test.skip clean package
Binaries will be on the target
folder.
DBPTK-Developer migrate its packages to GitHub packages. Please follow the Documentation provided by GitHub on how to install a package.
To develop we recommend the use of Maven and Eclipse (or Intellij with Eclipse Code Formatter plugin).
The following plugins should be installed in Eclipse:
- ANSI Escape in Console to have coloured output in tests
And the following environment variables should be set:
- DPT_MYSQL_USER - MySQL user that must be able to create new users and give them permissions (uses 'root' if not defined)
- DPT_MYSQL_PASS - MySQL user's password (uses blank password if not defined)
- DPT_POSTGRESQL_USER - PostgreSQL user that must be able to create new users and give them permissions (uses 'postgres' if not defined)
- DPT_POSTGRESQL_PASS - PostgreSQL user's password (uses blank password if not defined)
To run PostgreSQL tests, a local PostgreSQL database is required and postgres user or another user with permission to create new databases and users can be used. This user must be accessible by IP connection on localhost. The access can be tested with psql -U username -h 127.0.0.1 -d postgres -W
.
To run MySQL tests, a local MySQL (or MariaDB) database is required and 'root' user or another user with permission to create new databases and users can be used. This user must be accessible by IP connection on localhost. The access can be tested with mysql --user="username" -p --database="mysql" --host="127.0.0.1"
.
Use mvn clean install -Pcommon
to locally install the common artifacts so they can be used by other projects.
Note that this is not necessary unless you do not have access to KEEPS Artifactory or you want to make changes to the common artifacts to use in other projects.
After changing SIARD XML Schema files, maven must be used to compile a new artifact from the XML Schema (using JAXB). To do this, run mvn clean install -Pdbptk-bindings
from project root folder.
This will install the artifacts locally and they will be used in favour of the ones in KEEPS Artifactory.
This release build/deploy method requires gren
:
curl https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
source ~/.nvm/nvm.sh
nvm install v8.11.1
npm install github-release-notes -g
- Make sure the dependencies are installed by running
gren
- Security check:
mvn com.redhat.victims.maven:security-versions:check
- Update check:
./scripts/check_versions.sh MINOR
Example release new 2.2.0 version (up from 2.1.0) and prepare for next version 2.3.0
- Run
./scripts/release.sh 2.2.0
- Wait for GitHub action build to be finished and successful
gren release --draft -t v2.1.0..v2.2.0
- Review release and accept release:
- Review issues
- Accept release
- Run
./scripts/update_changelog.sh 2.2.0
- Run
./scripts/prepare_next_version.sh 2.3.0