#!/usr/bin/env bash

mkdir cmake-build-release
cd cmake-build-release
cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DTHREAD_SANITIZER=OFF
make

rm -r -f ../release
mkdir ../release
cp -r bin/ ../release/bin
cp -r lib/ ../release/lib
cp -r ../lib/pls/include/ ../release/include/
rm -f -r ../release/lib/pls

# echo the result of make to show it in gitlab
exit $?
