desktop: drop tauri.conf.json version field, inherit from the crate
4-octet isn't valid semver, so Tauri's build refused it — cargo build died before it started. desktop/Cargo.toml is the single source now; the release gate and bump-version stop touching the field.
This commit is contained in:
parent
e2dab2845a
commit
8ee6d001f3
3 changed files with 8 additions and 22 deletions
|
|
@ -53,9 +53,11 @@ jobs:
|
|||
FAIL=1
|
||||
fi
|
||||
|
||||
# Desktop: optional component, but if present, its versions must match.
|
||||
# desktop/Cargo.toml holds the Rust crate version (3-part semver);
|
||||
# desktop/tauri.conf.json holds the display version (4-octet).
|
||||
# Desktop: optional component, but if present, its version must match.
|
||||
# desktop/Cargo.toml is the single source of the desktop version (3-part
|
||||
# semver); tauri.conf.json carries no version field and inherits it from
|
||||
# the crate (a 4-octet there is invalid semver and Tauri's build refuses
|
||||
# it), so there is nothing to cross-check on tauri.conf.json.
|
||||
if [ -f desktop/Cargo.toml ]; then
|
||||
DESKTOP_CARGO_VER=$(grep -m1 '^version' desktop/Cargo.toml | cut -d'"' -f2)
|
||||
echo "desktop/Cargo.toml: version=$DESKTOP_CARGO_VER"
|
||||
|
|
@ -64,14 +66,6 @@ jobs:
|
|||
FAIL=1
|
||||
fi
|
||||
fi
|
||||
if [ -f desktop/tauri.conf.json ]; then
|
||||
TAURI_VER=$(grep -oP '"version"\s*:\s*"\K[^"]+' desktop/tauri.conf.json | head -1 || echo "none")
|
||||
echo "desktop/tauri.conf.json: version=$TAURI_VER"
|
||||
if [ "$TAG" != "$TAURI_VER" ]; then
|
||||
echo "::error::tag=$TAG but desktop/tauri.conf.json=$TAURI_VER"
|
||||
FAIL=1
|
||||
fi
|
||||
fi
|
||||
|
||||
# CHANGELOG must mention the version being released.
|
||||
if ! grep -q "$TAG" CHANGELOG.md; then
|
||||
|
|
@ -145,10 +139,6 @@ jobs:
|
|||
echo "[INFO] [gate] desktop version is $DESKTOP_VER (not 0.1.0 stub — version lockstep effective)"
|
||||
fi
|
||||
fi
|
||||
if [ -f desktop/tauri.conf.json ]; then
|
||||
TAURI_VER=$(grep -oP '"version"\s*:\s*"\K[^"]+' desktop/tauri.conf.json | head -1 || echo "")
|
||||
echo "desktop/tauri.conf.json: version=$TAURI_VER"
|
||||
fi
|
||||
else
|
||||
echo "[INFO] [gate] desktop component optional — no desktop/ directory, skipping"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "RedFlag",
|
||||
"version": "0.2.8.2",
|
||||
"identifier": "com.redflag.local",
|
||||
"build": {
|
||||
"beforeDevCommand": "npm --prefix ../web run dev:desktop",
|
||||
|
|
|
|||
|
|
@ -110,12 +110,9 @@ if [ -f "$FILE" ]; then
|
|||
echo " [5] desktop/Cargo.toml version -> $CARGO_VERSION (from $NEW_VERSION)"
|
||||
fi
|
||||
|
||||
# 5. desktop/tauri.conf.json — version (full 4-octet, matches docker-compose)
|
||||
FILE="$ROOT/desktop/tauri.conf.json"
|
||||
if [ -f "$FILE" ]; then
|
||||
sed -i -E "s/(\"version\"[[:space:]]*:[[:space:]]*)\"[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\"/\1\"$NEW_VERSION\"/" "$FILE"
|
||||
echo " [6] desktop/tauri.conf.json version -> $NEW_VERSION"
|
||||
fi
|
||||
# desktop/tauri.conf.json carries no version field — Tauri inherits it from
|
||||
# desktop/Cargo.toml (set above). A 4-octet there is not valid semver and Tauri's
|
||||
# build refuses it, so the desktop version has a single source: the crate.
|
||||
|
||||
echo ""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue