mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Add .env to .gitignore and update dependencies
- 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.
This commit is contained in:
parent
7b73720143
commit
2803c2d73a
7 changed files with 274 additions and 68 deletions
37
scripts/publish-plugin.ps1
Normal file
37
scripts/publish-plugin.ps1
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue