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
19 changes: 18 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,24 @@
".": {
"release-type": "node",
"include-component-in-tag": false,
"changelog-path": "CHANGELOG.md"
"changelog-path": "CHANGELOG.md",
"extra-files": [
{
"type": "json",
"path": "src-tauri/tauri.conf.json",
"jsonpath": "$.version"
},
{
"type": "toml",
"path": "src-tauri/Cargo.toml",
"jsonpath": "$.package.version"
},
{
"type": "toml",
"path": "src-tauri/Cargo.lock",
"jsonpath": "$.package[?(@.name==\"patchdeck\")].version"
}
]
}
}
}
20 changes: 20 additions & 0 deletions server/appBranding.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,23 @@ test("standalone metadata names the app PatchDeck (display) and patchdeck (packa
assert.equal(tauriConfig.app.windows[0].title, APP_DISPLAY_NAME);
assert.match(cargoToml, new RegExp(`^name = "${APP_PACKAGE_NAME}"$`, "m"));
});

test("release metadata keeps Tauri package versions in sync", async () => {
const packageJson = JSON.parse(await readProjectFile("package.json"));
const tauriConfig = JSON.parse(await readProjectFile("src-tauri/tauri.conf.json"));
const cargoToml = await readProjectFile("src-tauri/Cargo.toml");
const cargoLock = await readProjectFile("src-tauri/Cargo.lock");
const releasePleaseConfig = JSON.parse(await readProjectFile("release-please-config.json"));
const version = packageJson.version;

assert.equal(tauriConfig.version, version);
assert.match(cargoToml, new RegExp(`^version = "${version}"$`, "m"));
assert.match(cargoLock, new RegExp(`\\[\\[package\\]\\]\\nname = "${APP_PACKAGE_NAME}"\\nversion = "${version}"`, "m"));

const extraFilePaths = releasePleaseConfig.packages["."]["extra-files"].map((file: { path: string }) => file.path);
assert.deepEqual(extraFilePaths, [
"src-tauri/tauri.conf.json",
"src-tauri/Cargo.toml",
"src-tauri/Cargo.lock",
]);
});
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "patchdeck"
version = "1.2.1"
version = "1.3.0"
description = "Autonomous GitHub PR babysitter desktop app"
authors = ["KimY"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/nicedoc/schemas/main/tauri-v2/tauri.conf.schema.json",
"productName": "PatchDeck",
"version": "1.2.1",
"version": "1.3.0",
"identifier": "com.fluxlabs.patchdeck",
"build": {
"beforeDevCommand": "npm run dev",
Expand Down
Loading