Skip to content

Commit

Permalink
custom depot
Browse files Browse the repository at this point in the history
  • Loading branch information
DileSoft committed Jan 31, 2024
1 parent 326a170 commit 3270cf1
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 35 deletions.
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ inputs:
rootPath:
required: false
description: 'The root path to your builds. This is the base of which depots will search your files.'
customDepot:
required: false
description: 'custom depot path'
customDepotId:
required: false
description: 'custom depot id'
depot1Path:
required: false
description: 'The path to depot1.'
Expand Down Expand Up @@ -69,6 +75,8 @@ runs:
firstDepotIdOverride: ${{ inputs.firstDepotIdOverride }}
buildDescription: ${{ inputs.buildDescription }}
rootPath: ${{ inputs.rootPath }}
customDepot: ${{ inputs.customDepot }}
customDepotId: ${{ inputs.customDepotId }}
depot1Path: ${{ inputs.depot1Path }}
depot2Path: ${{ inputs.depot2Path }}
depot3Path: ${{ inputs.depot3Path }}
Expand Down
77 changes: 42 additions & 35 deletions steam_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
set -euo pipefail
IFS=$'\n\t'

apt-get update
apt-get install -y git
git config --global --add safe.directory '*'

steamdir=${STEAM_HOME:-$HOME/Steam}
# this is relative to the action
contentroot=$(pwd)/$rootPath
Expand All @@ -24,46 +28,48 @@ else
fi

i=1;
export DEPOTS="\n "
until [ $i -gt 9 ]; do
eval "currentDepotPath=\$depot${i}Path"
if [ -n "$currentDepotPath" ]; then
# depot1Path uses firstDepotId, depot2Path uses firstDepotId + 1, depot3Path uses firstDepotId + 2...
currentDepot=$((firstDepotId + i - 1))

echo ""
echo "Adding depot${currentDepot}.vdf ..."
echo ""
export DEPOTS="$DEPOTS \"$currentDepot\" \"depot${currentDepot}.vdf\"\n "
cat << EOF > "depot${currentDepot}.vdf"
"DepotBuildConfig"
{
"DepotID" "$currentDepot"
"FileMapping"
{
"LocalPath" "./$currentDepotPath/*"
"DepotPath" "."
"recursive" "1"
}
"FileExclusion" "*.pdb"
"FileExclusion" "**/*_BurstDebugInformation_DoNotShip*"
"FileExclusion" "**/*_BackUpThisFolder_ButDontShipItWithYourGame*"
}
EOF

cat depot${currentDepot}.vdf
echo ""
fi;

i=$((i+1))
done
# export DEPOTS="\n "
# until [ $i -gt 9 ]; do
# eval "currentDepotPath=\$depot${i}Path"
# if [ -n "$currentDepotPath" ]; then
# # depot1Path uses firstDepotId, depot2Path uses firstDepotId + 1, depot3Path uses firstDepotId + 2...
# currentDepot=$((firstDepotId + i - 1))

# echo ""
# echo "Adding depot${currentDepot}.vdf ..."
# echo ""
# export DEPOTS="$DEPOTS \"$currentDepot\" \"depot${currentDepot}.vdf\"\n "
# cat << EOF > "depot${currentDepot}.vdf"
# "DepotBuildConfig"
# {
# "DepotID" "$currentDepot"
# "FileMapping"
# {
# "LocalPath" "./$currentDepotPath/*"
# "DepotPath" "."
# "recursive" "1"
# }
# "FileExclusion" "*.pdb"
# "FileExclusion" "**/*_BurstDebugInformation_DoNotShip*"
# "FileExclusion" "**/*_BackUpThisFolder_ButDontShipItWithYourGame*"
# }
# EOF

# cat depot${currentDepot}.vdf
# echo ""
# fi;

# i=$((i+1))
# done

echo ""
echo "#################################"
echo "# Generating App Manifest #"
echo "#################################"
echo ""

GIT_SHOW=$(git show --quiet)

cat << EOF > "manifest.vdf"
"appbuild"
{
Expand All @@ -74,8 +80,9 @@ cat << EOF > "manifest.vdf"
"setlive" "$releaseBranch"
"depots"
{$(echo "$DEPOTS" | sed 's/\\n/\
/g')}
{
"$customDepotId" "$customDepot"
}
}
EOF

Expand Down

0 comments on commit 3270cf1

Please sign in to comment.