[Komodo] Commit Sync: update release.toml

This commit is contained in:
komodo
2025-03-23 22:52:54 +00:00
parent 247f6c7471
commit 8588c54646

View File

@ -143,51 +143,37 @@ name = "publish-release"
tags = ["release"] tags = ["release"]
[action.config] [action.config]
file_contents = """ file_contents = """
const KOMODO_VERSION = "1.16.11"; const BRANCH = "1.17.0";
const APPS = ["core", "periphery"]; const VERSION = "1.17.0";
const ARCHS = ["x86", "aarch64"]; const TAG = "release-1";
const last_version = (
await komodo.read("GetVariable", { name: "KOMODO_VERSION" })
).value;
// Update Variable
await komodo.write("UpdateVariableValue", { await komodo.write("UpdateVariableValue", {
name: "KOMODO_VERSION", name: "KOMODO_RELEASE_VERSION",
value: KOMODO_VERSION, value: VERSION,
}); });
console.log("Updated KOMODO_VERSION to " + KOMODO_VERSION); console.log("Updated KOMODO_RELEASE_VERSION to", VERSION);
// Update Builds await komodo.write("UpdateVariableValue", {
for (const app of APPS) { name: "KOMODO_RELEASE_TAG",
for (const arch of ARCHS) { value: TAG,
const name = `komodo-${app}-${arch}`; });
console.log("Updated KOMODO_RELEASE_TAG to", TAG);
const builds = await komodo.read("ListBuilds", { query: { tags: ["release"] } });
for (const build of builds) {
await komodo.write("UpdateBuild", { await komodo.write("UpdateBuild", {
id: name, id: build.id,
config: { config: { version: VERSION as any, branch: BRANCH },
version: KOMODO_VERSION as any,
},
}); });
console.log(`Updated Build ${name} to ${KOMODO_VERSION}`); console.log("Updated", build.name);
}
} }
// Update 'release' Sync references await komodo.write("CommitSync", { sync: "release" });
const sync = await komodo.read("GetResourceSync", { sync: "release" }); console.log("Committed changes to 'release' Sync");
const file = sync.info?.remote_contents?.find(
(file) => file.path === "release.toml",
);
await komodo.write("WriteSyncFileContents", {
sync: "release",
resource_path: file.resource_path,
file_path: file.path,
contents: file.contents.replaceAll(last_version, KOMODO_VERSION),
});
console.log(`Updated Sync references to ${KOMODO_VERSION}`);
// Start the procedure run. await komodo.execute("RunProcedure", { procedure: "build-release" });
await komodo.execute("RunProcedure", { procedure: "build_release" }); console.log("Launched 'build-release' Procedure");
console.log("Publish Procedure triggered ");
""" """
## ##