mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Remove syncback PowerShell and shell scripts. These files have been deleted as part of a cleanup process, streamlining the project structure and eliminating redundant scripts.
This commit is contained in:
parent
5ad50e65d4
commit
00872e65a4
2 changed files with 0 additions and 122 deletions
63
syncback.ps1
63
syncback.ps1
|
|
@ -1,63 +0,0 @@
|
||||||
#Requires -Version 5.1
|
|
||||||
|
|
||||||
$ProjectRbxl = "Project.rbxl"
|
|
||||||
$ProjectJsonFile = "default.project.json"
|
|
||||||
|
|
||||||
# Check for clean flag and filter it out
|
|
||||||
$DoClean = $false
|
|
||||||
$FilteredArgs = @()
|
|
||||||
foreach ($Arg in $args) {
|
|
||||||
if ($Arg -eq "clean") {
|
|
||||||
$DoClean = $true
|
|
||||||
} else {
|
|
||||||
$FilteredArgs += $Arg
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Load .env file
|
|
||||||
Get-Content ".env" | ForEach-Object {
|
|
||||||
if ($_ -match "^\s*([^#][^=]+)=(.*)$") {
|
|
||||||
Set-Variable -Name $Matches[1].Trim() -Value $Matches[2].Trim() -Scope Script
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$ProjectJson = Get-Content $ProjectJsonFile | ConvertFrom-Json
|
|
||||||
$PlaceId = $ProjectJson.servePlaceIds[0]
|
|
||||||
Write-Host "PlaceId: $PlaceId"
|
|
||||||
|
|
||||||
# Download rbxl from Roblox
|
|
||||||
$Url = "https://assetdelivery.roblox.com/v1/asset/?id=$PlaceId"
|
|
||||||
$Session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
|
|
||||||
$Cookie = New-Object System.Net.Cookie(".ROBLOSECURITY", $ROBLOSECURITY, "/", ".roblox.com")
|
|
||||||
$Session.Cookies.Add($Cookie)
|
|
||||||
|
|
||||||
Write-Host "Downloading $Url..."
|
|
||||||
Invoke-WebRequest -Uri $Url -WebSession $Session -OutFile $ProjectRbxl
|
|
||||||
|
|
||||||
# Delete src/ completely and recreate directory structure if --clean specified
|
|
||||||
if ($DoClean) {
|
|
||||||
Write-Host "Cleaning src/ directory..."
|
|
||||||
if (Test-Path "src") {
|
|
||||||
Remove-Item -Path "src" -Recurse -Force
|
|
||||||
}
|
|
||||||
New-Item -ItemType Directory -Path "src/ReplicatedFirst" -Force | Out-Null
|
|
||||||
New-Item -ItemType Directory -Path "src/ReplicatedStorage" -Force | Out-Null
|
|
||||||
New-Item -ItemType Directory -Path "src/ServerScriptService" -Force | Out-Null
|
|
||||||
New-Item -ItemType Directory -Path "src/ServerStorage" -Force | Out-Null
|
|
||||||
New-Item -ItemType Directory -Path "src/StarterPlayer/StarterCharacterScripts" -Force | Out-Null
|
|
||||||
New-Item -ItemType Directory -Path "src/StarterPlayer/StarterPlayerScripts" -Force | Out-Null
|
|
||||||
New-Item -ItemType Directory -Path "src/Workspace" -Force | Out-Null
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($FilteredArgs.Count -eq 0) {
|
|
||||||
rojo syncback --non-interactive --input $ProjectRbxl $ProjectJsonFile
|
|
||||||
} else {
|
|
||||||
rojo syncback --non-interactive @FilteredArgs --input $ProjectRbxl $ProjectJsonFile
|
|
||||||
}
|
|
||||||
|
|
||||||
# Stage all changes
|
|
||||||
if ($DoClean) {
|
|
||||||
Write-Host "Running git add..."
|
|
||||||
git add .
|
|
||||||
git add --renormalize .
|
|
||||||
}
|
|
||||||
59
syncback.sh
59
syncback.sh
|
|
@ -1,59 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
ProjectRbxl="Project.rbxl"
|
|
||||||
ProjectJsonFile="default.project.json"
|
|
||||||
|
|
||||||
# Check for clean flag and filter it out
|
|
||||||
DoClean=false
|
|
||||||
FilteredArgs=""
|
|
||||||
for Arg in "$@"; do
|
|
||||||
if [ "$Arg" = "clean" ]; then
|
|
||||||
DoClean=true
|
|
||||||
else
|
|
||||||
FilteredArgs="$FilteredArgs $Arg"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Load .env file (auto-export all variables)
|
|
||||||
if [ -f ".env" ]; then
|
|
||||||
set -a
|
|
||||||
. ./.env
|
|
||||||
set +a
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Extract PlaceId from project json (first number after servePlaceIds line)
|
|
||||||
PlaceId=$(grep -A1 'servePlaceIds' "$ProjectJsonFile" | grep -o '[0-9]\+')
|
|
||||||
echo "PlaceId: $PlaceId"
|
|
||||||
|
|
||||||
# Download rbxl from Roblox
|
|
||||||
Url="https://assetdelivery.roblox.com/v1/asset/?id=$PlaceId"
|
|
||||||
echo "Downloading $Url..."
|
|
||||||
curl -fSL --compressed -o "$ProjectRbxl" -H "Cookie: .ROBLOSECURITY=${ROBLOSECURITY}" "$Url"
|
|
||||||
|
|
||||||
# Delete src/ completely and recreate directory structure if --clean specified
|
|
||||||
if [ "$DoClean" = true ]; then
|
|
||||||
echo "Cleaning src/ directory..."
|
|
||||||
rm -rf src
|
|
||||||
mkdir -p src/ReplicatedFirst
|
|
||||||
mkdir -p src/ReplicatedStorage
|
|
||||||
mkdir -p src/ServerScriptService
|
|
||||||
mkdir -p src/ServerStorage
|
|
||||||
mkdir -p src/StarterPlayer/StarterCharacterScripts
|
|
||||||
mkdir -p src/StarterPlayer/StarterPlayerScripts
|
|
||||||
mkdir -p src/Workspace
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$FilteredArgs" ]; then
|
|
||||||
rojo syncback --non-interactive --input "$ProjectRbxl" "$ProjectJsonFile"
|
|
||||||
else
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
rojo syncback --non-interactive $FilteredArgs --input "$ProjectRbxl" "$ProjectJsonFile"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Stage all changes
|
|
||||||
if [ "$DoClean" = true ]; then
|
|
||||||
echo "Running git add..."
|
|
||||||
git add .
|
|
||||||
git add --renormalize .
|
|
||||||
fi
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue