[Komodo] Commit Sync: update release.toml
This commit is contained in:
62
release.toml
62
release.toml
@ -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}`;
|
});
|
||||||
await komodo.write("UpdateBuild", {
|
console.log("Updated KOMODO_RELEASE_TAG to", TAG);
|
||||||
id: name,
|
|
||||||
config: {
|
const builds = await komodo.read("ListBuilds", { query: { tags: ["release"] } });
|
||||||
version: KOMODO_VERSION as any,
|
|
||||||
},
|
for (const build of builds) {
|
||||||
});
|
await komodo.write("UpdateBuild", {
|
||||||
console.log(`Updated Build ${name} to ${KOMODO_VERSION}`);
|
id: build.id,
|
||||||
}
|
config: { version: VERSION as any, branch: BRANCH },
|
||||||
|
});
|
||||||
|
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 ✅");
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
##
|
##
|
||||||
|
Reference in New Issue
Block a user