-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgen-ts.sh
More file actions
executable file
·33 lines (24 loc) · 932 Bytes
/
gen-ts.sh
File metadata and controls
executable file
·33 lines (24 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
#if [ "$DOTNET_ROOT" == "" ]; then
# echo "specify DOTNET_ROOT env var"
# exit 0
#fi
exdir=$(dirname `readlink -f "$0"`)
#rm -fr "$exdir"/src/bin "$exdir"/src/obj
dotnet build "$exdir"/src
# dotnet build "$exdir"/src /p:CopyLocalLockFileAssemblies=true
# follow required to allow ReinforcedTypings recognize some dll refs
# cp -f "$DOTNET_ROOT"/shared/Microsoft.AspNetCore.App/3.0.0/* "$exdir"/src/bin/Debug/netcoreapp3.0/
dstapi="$exdir/ClientApp/src/api-autogen/"
rm -fr "$dstapi"
mkdir -p "$dstapi"
DLL="$exdir/src/bin/Debug/netcoreapp3.0/example-netcore-to-typescript.dll"
echo "---> DLL: $DLL"
echo
dotnet ~/.nuget/packages/reinforced.typings/1.5.6/tools/netcoreapp3.0/rtcli.dll \
SourceAssemblies="$DLL" \
ConfigurationMethod="example_netcore_to_typescript.ReinforcedTypingsConfiguration.Configure" \
TargetDirectory="$dstapi" \
Hierarchy="true"
echo
echo "---> destination api = $dstapi"