@@ -23,6 +23,9 @@ INSTALLER_DIRNAME="installer"
2323
2424# ## Parameters
2525
26+ # This script
27+ SCRIPT_PATH=" $( cd -- " $( dirname " $0 " ) " > /dev/null 2>&1 ; pwd -P ) "
28+
2629# The location of the root of the server repo relative to this script
2730repo_base=" ../../CodeProject.AI-Server"
2831
@@ -182,22 +185,22 @@ copyApplicationDirectory() {
182185
183186 # 1. Build server
184187 log_info " Building Application"
185- dotnet build ../.. /src/server /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary -c Release > /dev/null # 2>&1
188+ dotnet build ${repo_base} /src/server /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary -c Release > /dev/null # 2>&1
186189
187190 # 2. Move files to the Staging area
188191 log_info " Copying application into build directory"
189192
190193 mkdir -p " ${APPLICATION_DIRECTORY} /server"
191- cp -r " ../.. /src/server/bin/Release/net7.0/." " ${APPLICATION_DIRECTORY} /server/"
192- cp " ../.. /LICENCE.md" " ${APPLICATION_DIRECTORY} "
194+ cp -r " ${repo_base} /src/server/bin/Release/net7.0/." " ${APPLICATION_DIRECTORY} /server/"
195+ cp " ${repo_base} /LICENCE.md" " ${APPLICATION_DIRECTORY} "
193196
194197 mkdir -p " $APPLICATION_DIRECTORY /SDK"
195- cp -r " ../.. /src/SDK/Python" " ${APPLICATION_DIRECTORY} /SDK/Python/"
196- cp -r " ../.. /src/SDK/Scripts" " ${APPLICATION_DIRECTORY} /SDK/Scripts/"
197- cp " ../.. /src/SDK/install.sh" " ${APPLICATION_DIRECTORY} /SDK/"
198- cp " ../.. /src/server/install.sh" " ${APPLICATION_DIRECTORY} /server/"
198+ cp -r " ${repo_base} /src/SDK/Python" " ${APPLICATION_DIRECTORY} /SDK/Python/"
199+ cp -r " ${repo_base} /src/SDK/Scripts" " ${APPLICATION_DIRECTORY} /SDK/Scripts/"
200+ cp " ${repo_base} /src/SDK/install.sh" " ${APPLICATION_DIRECTORY} /SDK/"
201+ cp " ${repo_base} /src/server/install.sh" " ${APPLICATION_DIRECTORY} /server/"
199202
200- cp " ../.. /src/setup.sh" " ${APPLICATION_DIRECTORY} /"
203+ cp " ${repo_base} /src/setup.sh" " ${APPLICATION_DIRECTORY} /"
201204
202205 # Quick cleanup
203206 find " ${APPLICATION_DIRECTORY} " -name __pycache__ -type d -exec rm -rf {} \; > /dev/null 2>&1
0 commit comments