mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
feat: validate version format in auto-updater and release workflow
- Added a check in the desktop release workflow to ensure version tags follow semantic versioning (semver) format. - Enhanced the auto-updater to log a message and skip updates if the app version is not valid semver. - Improved type definitions for event handlers in the auto-updater for better TypeScript support.
This commit is contained in:
parent
f428cd97d9
commit
6dd85dd365
2 changed files with 18 additions and 5 deletions
4
.github/workflows/desktop-release.yml
vendored
4
.github/workflows/desktop-release.yml
vendored
|
|
@ -52,6 +52,10 @@ jobs:
|
|||
VERSION=${TAG#beta-}
|
||||
VERSION=${VERSION#v}
|
||||
fi
|
||||
if ! echo "$VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?$'; then
|
||||
echo "::error::Version '$VERSION' is not valid semver (expected X.Y.Z). Fix your tag name."
|
||||
exit 1
|
||||
fi
|
||||
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Setup pnpm
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue