Evil multitargetting
This commit is contained in:
parent
f9edec572a
commit
9bed4a8cb1
4 changed files with 54 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
||||||
name: Release
|
name: Sync & Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
@ -6,8 +6,8 @@ on:
|
||||||
- cron: "10 0 * * *" # Runs at 00:10 UTC every day
|
- cron: "10 0 * * *" # Runs at 00:10 UTC every day
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
sync_and_release:
|
||||||
name: Sync
|
name: Sync & Release
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/catthehacker/ubuntu:act-24.04
|
image: ghcr.io/catthehacker/ubuntu:act-24.04
|
||||||
|
@ -79,11 +79,6 @@ jobs:
|
||||||
- name: Release
|
- name: Release
|
||||||
run: lune run src/init -- release jecs --pesde-scope marked/jecs_nightly --wally-scope mark-marks/jecs-nightly
|
run: lune run src/init -- release jecs --pesde-scope marked/jecs_nightly --wally-scope mark-marks/jecs-nightly
|
||||||
|
|
||||||
- name: Cleanup
|
|
||||||
run: |
|
|
||||||
rm -rf luau-install
|
|
||||||
rm jecs_nightly.rbxm
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
id: create_pull_request
|
id: create_pull_request
|
||||||
uses: https://git.devmarked.win/actions/create-pull-request@7174d368c2e4450dea17b297819eb28ae93ee645
|
uses: https://git.devmarked.win/actions/create-pull-request@7174d368c2e4450dea17b297819eb28ae93ee645
|
||||||
|
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1 +1,5 @@
|
||||||
**/*.tar.gz
|
**/*.tar.gz
|
||||||
|
**/*packages
|
||||||
|
**/pesde.lock
|
||||||
|
**/luau-install
|
||||||
|
**/*.rbxm
|
||||||
|
|
|
@ -7,6 +7,7 @@ local stdio = require("@lune/stdio")
|
||||||
local progress_bar = require("./util/progress")
|
local progress_bar = require("./util/progress")
|
||||||
local result = require("./util/result")
|
local result = require("./util/result")
|
||||||
local shared = require("./shared")
|
local shared = require("./shared")
|
||||||
|
local tbl = require("./util/tbl")
|
||||||
local types = require("./types")
|
local types = require("./types")
|
||||||
|
|
||||||
local function make_pesde_manifest(version: string, scope: string): types.PesdeManifest
|
local function make_pesde_manifest(version: string, scope: string): types.PesdeManifest
|
||||||
|
@ -94,6 +95,15 @@ local function release(origin: string, scopes: { wally: string?, pesde: string?
|
||||||
local manifest = make_pesde_manifest(version, scopes.pesde)
|
local manifest = make_pesde_manifest(version, scopes.pesde)
|
||||||
local encoded = serde.encode("toml", manifest)
|
local encoded = serde.encode("toml", manifest)
|
||||||
fs.writeFile(`{origin}/pesde.toml`, encoded)
|
fs.writeFile(`{origin}/pesde.toml`, encoded)
|
||||||
|
|
||||||
|
local rbx_manifest = tbl.deep_clone(manifest)
|
||||||
|
rbx_manifest.target = {
|
||||||
|
environment = "roblox",
|
||||||
|
lib = "jecs.luau",
|
||||||
|
build_files = { "jecs.luau" },
|
||||||
|
}
|
||||||
|
local encoded_rbx = serde.encode("toml", rbx_manifest)
|
||||||
|
fs.writeFile(`{origin}/pesde-rbx.toml`, encoded_rbx)
|
||||||
end
|
end
|
||||||
|
|
||||||
if scopes.wally then
|
if scopes.wally then
|
||||||
|
@ -121,6 +131,29 @@ local function release(origin: string, scopes: { wally: string?, pesde: string?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local res_pesde_rbx
|
||||||
|
if scopes.pesde then
|
||||||
|
fs.move(`{origin}/pesde.toml`, `{origin}/pesde-luau.toml`)
|
||||||
|
fs.move(`{origin}/pesde-rbx.toml`, `{origin}/pesde.toml`)
|
||||||
|
process.spawn("pesde", { "install" }, { cwd = cwd })
|
||||||
|
|
||||||
|
if not dry then
|
||||||
|
res_pesde_rbx = process.spawn("pesde", { "publish", "-y" }, { cwd = cwd })
|
||||||
|
else
|
||||||
|
res_pesde_rbx = process.spawn("pesde", { "publish", "-d", "-y" }, { cwd = cwd })
|
||||||
|
end
|
||||||
|
|
||||||
|
fs.move(`{origin}/pesde.toml`, `{origin}/pesde-rbx.toml`)
|
||||||
|
fs.move(`{origin}/pesde-luau.toml`, `{origin}/pesde.toml`)
|
||||||
|
process.spawn("pesde", { "install" }, { cwd = cwd })
|
||||||
|
|
||||||
|
if not res_pesde_rbx.ok then
|
||||||
|
progress:stop()
|
||||||
|
print(`-- Pesde error:\nstdout\n{res_pesde_rbx.stdout}\nstderr\n{res_pesde_rbx.stderr}`)
|
||||||
|
return result(false, `Pesde error:\nstdout\n{res_pesde_rbx.stdout}\nstderr\n{res_pesde_rbx.stderr}`)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
progress:nextStage() -- release (wally)
|
progress:nextStage() -- release (wally)
|
||||||
|
|
||||||
local res_wally
|
local res_wally
|
||||||
|
|
14
src/util/tbl.luau
Normal file
14
src/util/tbl.luau
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
--!strict
|
||||||
|
local function deep_clone<T>(t: T): T
|
||||||
|
local clone = table.clone(t :: any)
|
||||||
|
for k, v in clone do
|
||||||
|
if type(v) == "table" then
|
||||||
|
clone[k] = deep_clone(v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return clone :: any
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
deep_clone = deep_clone,
|
||||||
|
}
|
Loading…
Reference in a new issue