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: 1 addition & 1 deletion surfsense_backend/app/license/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
logger = logging.getLogger(__name__)

# Written by bump-version.sh. Do not edit by hand.
APP_RELEASE_VERSION = "2.0.0"
APP_RELEASE_VERSION = "2.0.1"
APP_RELEASE_TAG = f"v{APP_RELEASE_VERSION}"

_REPO = "MODSetter/SurfSense"
Expand Down
2 changes: 1 addition & 1 deletion surfsense_local/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0
2.0.1
2 changes: 1 addition & 1 deletion surfsense_local/backend/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "surfsense-local-backend"
version = "2.0.0"
version = "2.0.1"
description = "SurfSense Community Local backend"
requires-python = ">=3.12"
dependencies = [
Expand Down
44 changes: 22 additions & 22 deletions surfsense_local/backend/uv.lock

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

2 changes: 1 addition & 1 deletion surfsense_local/electron/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "surfsense-local-electron",
"private": true,
"version": "2.0.0",
"version": "2.0.1",
"description": "Electron shell: spawns the API + worker sidecars, loads the Vite SPA",
"author": {
"name": "SurfSense",
Expand Down
2 changes: 1 addition & 1 deletion surfsense_local/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "surfsense-local-frontend",
"private": true,
"version": "2.0.0",
"version": "2.0.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
29 changes: 28 additions & 1 deletion surfsense_local/scripts/bump-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,36 @@ TOML_FIELD='^version[[:space:]]*=[[:space:]]*"[^"]*"'
TS_FIELD='^export const APP_RELEASE_VERSION = "[^"]*"'
PY_FIELD='^APP_RELEASE_VERSION = "[^"]*"'

if command -v python3 >/dev/null 2>&1; then
PYTHON=python3
elif command -v python >/dev/null 2>&1; then
PYTHON=python
else
echo "ERROR: python3 is required to rewrite version fields" >&2
exit 1
fi

echo "Bumping surfsense_local to $VERSION"
echo "---------------------------------"

# ponytail: GNU `sed -i` is not BSD or Windows; CPython is already on the
# Mac/Linux/Windows machines that cut this release. Ceiling: POSIX `[[:space:]]`
# in the grep patterns is mapped to `\s` here — upgrade if a field needs a
# real character class.
rewrite_first() {
"$PYTHON" - "$1" "$2" "$3" <<'PY'
import pathlib, re, sys

path, field, replacement = pathlib.Path(sys.argv[1]), sys.argv[2], sys.argv[3]
pattern = field.replace("[[:space:]]", r"\s")
text = path.read_text(encoding="utf-8")
new, n = re.subn(pattern, replacement, text, count=1, flags=re.MULTILINE)
if n != 1:
raise SystemExit(f"no version field match in {path}")
path.write_text(new, encoding="utf-8")
PY
}

bump() {
local file="$1" field="$2" replacement="$3"
if [ ! -f "$file" ]; then
Expand All @@ -42,7 +69,7 @@ bump() {
return
fi

sed -i "0,/$field/s//$replacement/" "$file"
rewrite_first "$file" "$field" "$replacement"

if ! grep -qF "$replacement" "$file"; then
echo "ERROR: failed to rewrite version in $file" >&2
Expand Down
2 changes: 1 addition & 1 deletion surfsense_web/lib/app-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* No React and no directives, so server and client code can both import it.
*/

export const APP_RELEASE_VERSION = "2.0.0";
export const APP_RELEASE_VERSION = "2.0.1";

export const APP_RELEASE_TAG = `v${APP_RELEASE_VERSION}`;

Expand Down
Loading