Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/fix-tauri-version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"algohub": patch:fix
---

Automatic update of version for `tauri.conf.json`.
3 changes: 3 additions & 0 deletions .github/workflows/covector-version-or-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ jobs:
- name: Build TailwindCSS
run: pnpx tailwindcss -i ./input.css -o ./src/assets/tailwind.css

- name: Bump Tauri version
run: pnpm version:bump tauri --version ${{ needs.version-or-publish.outputs.version }}

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
22 changes: 21 additions & 1 deletion scripts/bump.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineCommand, run } from "archons";
import { writeFileSync } from "fs";
import { readFileSync, writeFileSync } from "fs";

const bump = defineCommand({
meta: {
Expand All @@ -10,11 +10,31 @@ const bump = defineCommand({
version: {
type: "option",
parser: "string",
global: true,
},
},
callback: (ctx) => {
writeFileSync(".version", ctx.args.version);
},
subcommands: {
tauri: {
meta: {
name: "tauri",
styled: true,
},
options: {},
callback: (ctx) => {
const tauriConfig = JSON.parse(
readFileSync("./src-tauri/tauri.conf.json", "utf-8")
);
tauriConfig.version = ctx.args.version;
writeFileSync(
"./src-tauri/tauri.conf.json",
JSON.stringify(tauriConfig, null, 2)
);
},
},
},
});

run(bump);