#!/usr/bin/env bash set -e dir=$(cd "$(dirname "$0")"; pwd) rootdir="$dir/../.." dotnet_configuration=DebugOpt make_configuration=debug platform=x64 jsinterp="$dir/runtime/build/qjs" usage() { cat <&2 usage ;; esac done if [ "$CI" = "true" ]; then red="" green="" reset="" else red=`tput setaf 1` green=`tput setaf 2` reset=`tput sgr0` fi # 1) Generate generate=true if [ $generate = true ]; then echo "${green}Generating bindings with .NET configuration $dotnet_configuration${reset}" dotnet "$rootdir/bin/${dotnet_configuration}/CppSharp.CLI.dll" \ --gen=ts -I$dir/.. -I$rootdir/include -o $dir/gen -m tests $dir/../*.h fi # 2) Type-checking echo "${green}Typechecking generated binding files with tsc${reset}" #tsc --noEmit --strict --noImplicitAny --strictNullChecks --strictFunctionTypes --noImplicitThis gen/*.d.ts