Introduction
The js7 repository holds the source code to build JS7 Controllers and JS7 Agents.
Prerequisites
The js7 project is a scala project and has to be build with sbt (Scala Build Tool). SOS uses version 1.1.5 with sbt_script version 1.4.2.
Clone Repository
Navigate to your desired destination folder and clone the repository from the github page.
git clone https://github.com/sos-berlin/js7
Checkout
Checkout Tagged Version
git fetch --all --tags
git checkout tags/[desired version] -b [desired local branch name] e.g. git checkout tags/v2.0.0 -b release/v2.0.0
Checkout Latest Tagged Version
Determine latest tagged version and store it to a local variable.
tag=$(git describe --tags `git rev-list --tags --max-count=1`)
Checkout latest using the just stored variable to a local branch "latest".
git checkout $tag -b latest
Build
Navigate to the root of the checked out project.
Set repository credentials and repository URI for the build to determine where to put the compiled binaries (*.jar files).
The credentials to deploy to a binary repository have to be available from a credentials file, see https://www.scala-sbt.org/1.x/docs/Publishing.html#Credentials.
export SBT_OPTS="-DpublishRepository.credentialsFile=/path/to/credentials/file -DpublishRepository.uri=uri/of/the/binary/repository";
Build the project.
./sbt-batch clean-all compile universal:publish