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
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
Write-Host "$tag is new. Continuing with the signed application release."
}

exit 0

- name: Existing version — no release required
if: steps.release_state.outputs.release_needed == 'false'
shell: pwsh
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

12 changes: 12 additions & 0 deletions scripts/verify-versions.mjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
import fs from 'node:fs';

const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
const packageLock = JSON.parse(fs.readFileSync('package-lock.json', 'utf8'));
const tauri = JSON.parse(fs.readFileSync('src-tauri/tauri.conf.json', 'utf8'));
const cargo = fs.readFileSync('src-tauri/Cargo.toml', 'utf8');
const cargoLock = fs.readFileSync('src-tauri/Cargo.lock', 'utf8');
const cargoMatch = cargo.match(/^version\s*=\s*"([^"]+)"/m);
const cargoLockMatch = cargoLock.match(
/\[\[package\]\]\r?\nname\s*=\s*"spark-desktop"\r?\nversion\s*=\s*"([^"]+)"/,
);

if (!cargoMatch) {
throw new Error('Could not read the package version from src-tauri/Cargo.toml.');
}

if (!cargoLockMatch) {
throw new Error('Could not read the package version from src-tauri/Cargo.lock.');
}

const versions = {
packageJson: pkg.version,
packageLock: packageLock.version,
packageLockRoot: packageLock.packages[''].version,
tauriConfig: tauri.version,
cargoToml: cargoMatch[1],
cargoLock: cargoLockMatch[1],
};

const unique = new Set(Object.values(versions));
Expand Down
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.