Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Borber committed Nov 21, 2023
1 parent 94eac61 commit cdaf739
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,4 @@ jobs:
- name: Add tag
env:
MATRIX_LANG: ${{ matrix.lang }}
run: |
cd src-tauri/target/release/bundle
deno run -A script/tag.ts
run: deno run -A script/tag.ts
7 changes: 4 additions & 3 deletions script/tag.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
const dirs = ["msi", "nsis", "deb", "appimage", "dmg", "macos",]

const lang = Deno.env.get("MATRIX_LANG")
const root = "../src-tauri/target/release/bundle"

for (const dir of dirs) {
if (Deno.statSync(`./${dir}`).isDirectory) {
if (Deno.statSync(`${root}/${dir}`).isDirectory) {
for await (const file of Deno.readDir(dir)) {
if (file.isFile && file.name.startsWith("tran")) {
let name = file.name
name = name.replace("tran", "tran" + "_" + lang)
Deno.renameSync(`./${dir}/${file.name}`, `./${dir}/${name}`)
console.log(`./${dir}/${name}`)
Deno.renameSync(`${root}/${file.name}`, `${root}/${name}`)
console.log(`${root}/${name}`)
}
}
}
Expand Down

0 comments on commit cdaf739

Please sign in to comment.