-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sim-server as submodule and setup builds to use it
- Loading branch information
Showing
7 changed files
with
46 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "packages/simulator-server"] | ||
path = packages/simulator-server | ||
url = [email protected]:software-mansion-labs/simulator-server.git |
Submodule simulator-server
added at
0af8a3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# take output directory from first argument or default to out | ||
output_dir="${1:-out}" | ||
|
||
# take configuration from second argument or default to Debug | ||
configuration=${2:-Debug} | ||
|
||
# Get the directory where the script is located | ||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
|
||
target_dir="${script_dir}/../${output_dir}" | ||
target_location="${target_dir}/sim-server" | ||
|
||
# Create the target directory if it doesn't exist | ||
mkdir -p "$target_dir" | ||
|
||
# execute the build from the simulator-server package | ||
build_script_location="$script_dir/../../simulator-server/build.sh" | ||
# the build product location is printed by the build script as the very last line, we capture this line to a variable to parse it: | ||
product_path=$("$build_script_location" "$configuration" | tail -n 1) | ||
|
||
# Check if the build was successful | ||
if [[ $? -ne 0 ]]; then | ||
echo "Build failed." | ||
exit 1 | ||
fi | ||
|
||
# Check if a file was found and copy it | ||
if [[ -n $product_path ]]; then | ||
echo "Found binary at $product_path" | ||
cp "$product_path" "$target_location" | ||
else | ||
echo "No file found matching the pattern." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters