Skip to content

Commit

Permalink
mod
Browse files Browse the repository at this point in the history
  • Loading branch information
Borber committed Feb 5, 2024
1 parent c97ceb1 commit 03a8b32
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions script/built.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { ensureDir } from "https://deno.land/[email protected]/fs/mod.ts";

const dirs = ["msi", "nsis", "deb", "appimage", "dmg", "macos"]
const dirs = ["msi", "nsis", "deb", "rpm", "appimage", "dmg", "macos"]

const system = Deno.env.get("TRAN_PLATFORM")
const lang = Deno.env.get("MATRIX_LANG")
const target = Deno.env.get("MATRIX_TARGET") ?? ""

console.log("Start built " + system + " " + lang + " " + target);

const root = "src-tauri/target" + target + "/release"
const bundle = root + "/bundle"

Expand All @@ -19,7 +17,7 @@ for (const dir of dirs) {
if (Deno.statSync(`${bundle}/${dir}`).isDirectory) {
for await (const file of Deno.readDir(`${bundle}/${dir}`)) {
console.log(`${bundle}/${dir}/${file.name}`)
if (file.isFile && (file.name.startsWith("Tran") || file.name.startsWith("tran"))) {
if (file.isFile && (file.name == "Tran" || file.name.startsWith("Tran") || file.name.startsWith("tran"))) {
let name = file.name
console.log("old:" + `${bundle}/${dir}/${file.name}`)
name = name.replace("Tran", "Tran" + "_" + lang)
Expand Down

0 comments on commit 03a8b32

Please sign in to comment.