mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 22:11:38 +00:00
- Added .env file to .gitignore to prevent environment secrets from being tracked. - Updated Cargo.lock to include new dependencies: mime, mime_guess, and unicase. - Modified Cargo.toml to enable multipart feature for reqwest. - Introduced a new PowerShell script for building and publishing the Rojo plugin. - Removed deprecated auth_cookie.rs file and adjusted upload command for new upload methods.
37 lines
1.2 KiB
PowerShell
37 lines
1.2 KiB
PowerShell
# Build and publish the Rojo plugin to the Creator Store
|
|
# Loads API key from .env file, ROBLOX_API_KEY env var, or -ApiKey argument.
|
|
# Get an API key at https://create.roblox.com/credentials (assets read+write).
|
|
|
|
param(
|
|
[string]$ApiKey
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
# Load .env file if it exists
|
|
$envFile = Join-Path $PSScriptRoot "..\.env"
|
|
if (Test-Path $envFile) {
|
|
foreach ($line in Get-Content $envFile) {
|
|
$line = $line.Trim()
|
|
if ($line -and -not $line.StartsWith("#")) {
|
|
$key, $value = $line -split "=", 2
|
|
if ($key -and $value) {
|
|
[Environment]::SetEnvironmentVariable($key.Trim(), $value.Trim(), "Process")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
# Resolve API key: argument > env var > .env (already loaded above)
|
|
if (-not $ApiKey) {
|
|
$ApiKey = $env:ROBLOX_API_KEY
|
|
}
|
|
|
|
if (-not $ApiKey -or $ApiKey -eq "your-key-here") {
|
|
Write-Host "Error: No API key provided." -ForegroundColor Red
|
|
Write-Host "Set ROBLOX_API_KEY in .env, env var, or pass -ApiKey <key>" -ForegroundColor Yellow
|
|
exit 1
|
|
}
|
|
|
|
Write-Host "Building and uploading plugin..." -ForegroundColor Cyan
|
|
cargo run -- upload plugin.project.json --asset_id 111151139098227
|