Skip to content

Commit

Permalink
Publish script, and playback fix for 0.0.1_test_a
Browse files Browse the repository at this point in the history
  • Loading branch information
ekky committed Jun 30, 2024
1 parent ed268e1 commit c121a54
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Server/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"autoDeleteLimit": 30,


"comment__authentication": "[AUTH] [DEFAULT: true] Enable Basic Authentication; use this setting if you'd like to password-protect the web server.",
"authentication": true,
"comment__authentication": "[AUTH] [DEFAULT: false] Enable Basic Authentication; use this setting if you'd like to password-protect the web server.",
"authentication": false,
"comment__authentication_extra_info": "The credentials is the username of the profile you use in SPT."
}
10 changes: 9 additions & 1 deletion Server/src/Web/Client/src/component/MapComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ export default function MapComponent({ raidData, profileId, raidId, positions })
crs: getCRS(mapData),
attributionControl: false,
id: mapData.id,
preferCanvas: true
preferCanvas: false
});

const zoomLevel = map.getZoom();
Expand Down Expand Up @@ -582,6 +582,14 @@ export default function MapComponent({ raidData, profileId, raidId, positions })

}
}

if (sliderTimes.length === 0) {
times = _.chain(times).uniq().sort((t) => t).value();
setSliderTimes(times);
setTimeStartLimit(times[0]);
setTimeEndLimit(times[times.length - 1]);
setTimeCurrentIndex(times.length - 1);
}

}, [mapViewRef, timeEndLimit, timeStartLimit, timeCurrentIndex, MAP, preserveHistory, events, hideEvents, hidePlayers, followPlayer, playerFocus]);

Expand Down
2 changes: 1 addition & 1 deletion Server/src/Web/Server/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Stats Mod Client</title>
<script src="https://cdn.tailwindcss.com"></script>
<script type="module" crossorigin src="/assets/index-4118ec3f.js"></script>
<script type="module" crossorigin src="/assets/index-34e75fd3.js"></script>
<link rel="stylesheet" href="/assets/index-26234131.css">
</head>
<body>
Expand Down
Empty file added exclude.txt
Empty file.
54 changes: 54 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env bash

# Default
default_name="raid_review"
default_version="0.1.0"
current_dir=$(pwd)

# Display a message
echo "Let's start the deployment process..."


# Prompt the user for name of the Mod
read -p "Please enter the name of your Mod [$default_name]: " name
name=${name:-$default_name} # Use default if user input is empty

# Prompt the user for version number of the Mod
read -p "Please enter the version number of your Mod [$default_version]: " version
version=${version:-$default_version} # Use default if user input is empty
### Create a package folder if it does not exist
server_package_folder="dist/${name}__${version}/user/mods/${name}__${version}"
rm -rf dist/${name}__${version}
if [ ! -d "$server_package_folder" ]; then
# If it doesn't exist, create it
mkdir -p "$server_package_folder"
echo ">>> Folder '$server_package_folder' created successfully."
else
echo ">>> Folder '$server_package_folder' already exists."
fi

### Build the server app
cd Server
npm run build-all
cd "$current_dir"
rm -f Server/dist/*.zip
cp -r Server/dist/* $server_package_folder
rm -rf $server_package_folder/tmp
cd "$server_package_folder/"
npm install
cd "$current_dir"

### Build the client mod
client_package_folder="dist/${name}__${version}/BepInEx/plugins"
mkdir -p $client_package_folder

xml_file="Client/RAID-REVIEW.csproj"
output_path=$(grep -oP '<OutputPath>\K.*?(?=</OutputPath>)' "$xml_file" | sed 's/^\s*//;s/\s*$//')
echo "OutputPath read from $xml_file:"
echo "$output_path"

cp "$output_path/${default_name^^}__${default_version}.dll" "$client_package_folder/"

### ZIP
cd "dist/${name}__${version}"
powershell -Command "Compress-Archive -Path '*' -DestinationPath "$default_name__$default_version_windows.zip"

0 comments on commit c121a54

Please sign in to comment.