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 03a8b32 commit 7ae691f
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
env:
MATRIX_LANG: ${{ matrix.lang }}
TRAN_PLATFORM: "windows"
run: deno run -A script/built.ts
run: deno run -A script/built-windows.ts

linux:
strategy:
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
env:
MATRIX_LANG: ${{ matrix.lang }}
TRAN_PLATFORM: "linux"
run: deno run -A script/built.ts
run: deno run -A script/built-linux.ts

macos:
strategy:
Expand Down Expand Up @@ -158,9 +158,9 @@ jobs:
- name: Built
env:
MATRIX_LANG: ${{ matrix.lang }}
MATRIX_TARGET: /${{ matrix.arch }}-apple-darwin
TRAN_PLATFORM: "macos"
run: deno run -A script/built.ts
MATRIX_ARCH: ${{ matrix.arch }}
TRAN_VERSION: ${{ needs.changelog.outputs.version }}
run: deno run -A script/built-macos.ts

fresh:
runs-on: ubuntu-latest
Expand Down
20 changes: 20 additions & 0 deletions script/built-linux.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const version = Deno.env.get("TRAN_VERSION")
const lang = Deno.env.get("MATRIX_LANG")

const root = "src-tauri/target/release/bundle/";
const deb = root + "deb/tran_" + version + "_amd64.deb"
const rpm = root + "rpm/tran-" + version + "-1.x86_64.rpm"
const appimage = root + "appimage/tran_" + version + "_amd64.AppImage"

const new_deb = "Tran_" + lang + "_amd64.deb"
const new_rpm = "Tran_" + lang + "_amd64.rpm"
const new_appimage = "Tran_" + lang + "_amd64.AppImage"

await Deno.mkdir("release")
await Deno.copyFile(deb, `release/${new_deb}`)
await Deno.copyFile(rpm, `release/${new_rpm}`)
await Deno.copyFile(appimage, `release/${new_appimage}`)

for await (const file of Deno.readDir("release")) {
console.log(file.name)
}
23 changes: 23 additions & 0 deletions script/built-macos.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const lang = Deno.env.get("MATRIX_LANG")
let arch = Deno.env.get("MATRIX_ARCH")
const version = Deno.env.get("TRAN_VERSION")

const root = "src-tauri/target/" + arch + "-apple-darwin/release/bundle/";

if (arch == "x86_64") {
arch = "x64"
}

const dmg = root + "dmg/tran_" + version + "_" + arch + ".dmg"
const macos = root + "macos/tran.app"

const new_dmg = "Tran_" + lang + "_x64.dmg"
const new_macos = "Tran_" + lang + "_x64.app"

await Deno.mkdir("release")
await Deno.copyFile(dmg, `release/${new_dmg}`)
await Deno.copyFile(macos, `release/${new_macos}`)

for await (const file of Deno.readDir("release")) {
console.log(file.name)
}
17 changes: 17 additions & 0 deletions script/built-windows.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const version = Deno.env.get("TRAN_VERSION")
const lang = Deno.env.get("MATRIX_LANG")

const root = "src-tauri/target/release/bundle/";
const msi = root + "msi/Tran_" + version + "_x64_en-US.msi"
const nsis = root + "nsis/Tran_" + version + "_x64-setup.exe"

const new_msi = "Tran_" + lang + "_x64.msi"
const new_nsis = "Tran_" + lang + "_x64-setup.exe"

await Deno.mkdir("release")
await Deno.copyFile(msi, `release/${new_msi}`)
await Deno.copyFile(nsis, `release/${new_nsis}`)

for await (const file of Deno.readDir("release")) {
console.log(file.name)
}

0 comments on commit 7ae691f

Please sign in to comment.