Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
fix(cli): stamp the release version into jan --version (#9491)
Akarshan Biswas07909f00c7f9
diff --git a/.github/scripts/stamp-version.sh b/.github/scripts/stamp-version.shnew file mode 100755index 000000000..a8f9134bb--- /dev/null+++ b/.github/scripts/stamp-version.sh@@ -0,0 +1,189 @@+#!/usr/bin/env bash+# The one place a build's version is written into the source tree.+#+# stamp-version.sh VERSION write VERSION into every manifest a release+# build reads it from, then verify the result+# stamp-version.sh --check fail if the committed manifests the app and the+# `jan` CLI report their version from disagree;+# warn if they are older than the latest release+# tag+# stamp-version.sh --check --base REV+# same, but a lag behind the latest tag fails too+# when a checked version differs between REV and+# the working tree+#+# Every desktop build template calls this instead of carrying its own list.+#+# A release stamp only lives in that build's workspace and is never committed,+# so a `jan` built from a v0.8.6+ tag or release branch reported the last+# committed version, 0.8.5 (janhq/jan-internal#454). --check keeps the+# committed manifests in step with each other and with the latest release;+# bumping them is still a commit (see `chore(release): bump app version to+# 0.8.5`).+#+# Lag policy: a release tag is pushed before anyone commits the matching bump,+# so a fatal lag check would turn every main push and every unrelated open PR+# red until that bump lands. Lag is therefore a warning by default. CI passes+# --base with the commit the change starts from, and lag becomes fatal only if+# a checked version value differs from that commit: a change that edits the+# versions has to leave them current, while one that merely touches a manifest+# (a new dependency, a tauri.conf.json setting) must not go red in that window.+# Disagreement between the manifests always fails.+#+# Stamping needs jq and ctoml; --check needs only jq and git, so a plain runner+# can guard the committed tree.+set -euo pipefail++ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"+cd "$ROOT"++# `jan --version` falls back to env!("CARGO_PKG_VERSION") inside app_lib, which+# is src-tauri/Cargo.toml's version, not jan-cli's; the CLI crate's own version+# only reaches Cargo.lock and `cargo install`. Both, plus the desktop's+# tauri.conf.json, must agree, so these are the files --check compares. The+# plugin manifests and web-app/package.json are stamped too but carry their+# own versions between releases, so they are not part of the check.+CHECKED_TOML="src-tauri/Cargo.toml src-tauri/jan-cli/Cargo.toml"+CHECKED_JSON="src-tauri/tauri.conf.json"+STAMPED_TOML="$CHECKED_TOML+ src-tauri/plugins/tauri-plugin-hardware/Cargo.toml+ src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml"+STAMPED_JSON="$CHECKED_JSON+ web-app/package.json+ src-tauri/plugins/tauri-plugin-hardware/package.json+ src-tauri/plugins/tauri-plugin-llamacpp/package.json"++# [package].version only: a dependency table can also carry `version = ...`.+# A Windows runner checks out with core.autocrlf, so a trailing CR would make+# `[package]` and every version comparison miss; both readers drop it.+toml_version() {+ awk '{ sub(/\r$/, "") }+ /^\[/ { pkg = ($0 == "[package]") }+ pkg && /^version[ \t]*=/ { sub(/^[^"]*"/, ""); sub(/".*/, ""); print; exit }' "$1"+}++# jq.exe writes text mode, so its own output can end in CRLF.+json_version() {+ jq -r '.version' "$1" | tr -d '\r'+}++# Prints each checked manifest's version and fails unless they are all equal+# (to $1 when given).+check() {+ local want="${1:-}" f v ok=1+ for f in $CHECKED_TOML; do+ v="$(toml_version "$f")"+ echo "$f: $v"+ [ -n "$want" ] || want="$v"+ [ "$v" = "$want" ] || ok=0+ done+ for f in $CHECKED_JSON; do+ v="$(json_version "$f")"+ echo "$f: $v"+ [ "$v" = "$want" ] || ok=0+ done+ if [ "$ok" != 1 ]; then+ echo "::error title=version drift::these manifests must all carry version $want; bump them together (or run .github/scripts/stamp-version.sh VERSION)"+ return 1+ fi+}++# Exits 0 when any checked manifest's version at $1 differs from the working+# tree's. A manifest absent at $1 counts as changed: adding one introduces a+# version just as much as editing it does. Reads through the same readers as+# check(), so the comparison cannot parse differently from the check itself.+version_changed() {+ local base="$1" f+ for f in $CHECKED_TOML $CHECKED_JSON; do+ git cat-file -e "$base:$f" 2>/dev/null || return 0+ done+ for f in $CHECKED_TOML; do+ [ "$(toml_version <(git show "$base:$f"))" = "$(toml_version "$f")" ] || return 0+ done+ for f in $CHECKED_JSON; do+ [ "$(json_version <(git show "$base:$f"))" = "$(json_version "$f")" ] || return 0+ done+ return 1+}++# Reports a lag finding: an error when $LAG_FATAL is 1, otherwise a warning+# (an Actions annotation on a runner, plain stderr locally) that keeps exit 0.+lag() {+ local title="$1" msg="$2"+ if [ "$LAG_FATAL" = 1 ]; then+ echo "::error title=$title::$msg"+ return 1+ fi+ if [ "${GITHUB_ACTIONS:-}" = true ]; then+ echo "::warning title=$title::$msg"+ else+ echo "warning: $title: $msg" >&2+ fi+}++# Agreeing manifests can still all lag: v0.8.6 to v0.8.8 shipped with every one+# at 0.8.5. Compare with the newest vX.Y.Z tag on origin; ls-remote needs no+# history, so a shallow CI checkout works. A pre-release bump (main ahead of+# the last tag) passes.+check_released() {+ local have="$1" tags latest+ if ! tags="$(git ls-remote --tags --refs origin 'refs/tags/v*')"; then+ lag "version check" "could not list origin's tags to compare against the latest release"+ return+ fi+ latest="$(printf '%s\n' "$tags" |+ sed -n 's#.*refs/tags/v\([0-9]*\.[0-9]*\.[0-9]*\)$#\1#p' | sort -V | tail -n 1)"+ if [ -z "$latest" ]; then+ echo "::warning title=version check::no vX.Y.Z tag on origin; skipped the release comparison"+ return 0+ fi+ echo "latest release tag: v$latest"+ if [ "$(printf '%s\n%s\n' "$latest" "$have" | sort -V | head -n 1)" != "$latest" ]; then+ lag "version behind release" "committed version $have is older than v$latest; bump the manifests (or run .github/scripts/stamp-version.sh $latest)"+ fi+}++stamp() {+ # A CR in the argument would be written into every manifest.+ local version="${1//$'\r'/}" f tmp+ tmp="$(mktemp)"+ for f in $STAMPED_JSON; do+ jq --arg version "$version" '.version = $version' "$f" > "$tmp"+ mv "$tmp" "$f"+ done+ for f in $STAMPED_TOML; do+ ctoml "$f" package.version "$version"+ done+ echo "stamped $version:"+ check "$version"+}++usage() {+ echo "usage: $0 VERSION | --check [--base REV]" >&2+ exit 2+}++LAG_FATAL=0+case "$#:${1:-}:${2:-}" in+ 1:--check:) ;;+ 3:--check:--base)+ # An unknown REV is a caller bug, not "no range": failing beats silently+ # downgrading the lag to a warning.+ git rev-parse --quiet --verify "$3^{commit}" > /dev/null ||+ { echo "--base $3: not a commit in this repository" >&2; exit 2; }+ if version_changed "$3"; then+ echo "a checked version differs from $3; a lag behind the latest tag is fatal"+ LAG_FATAL=1+ else+ echo "no checked version differs from $3; a lag behind the latest tag is a warning"+ fi+ ;;+ *:--check:*|*:-*|0:*) usage ;;+ 1:*) ;;+ *) usage ;;+esac++case "$1" in+ --check) check && check_released "$(toml_version src-tauri/Cargo.toml)" ;;+ *) stamp "$1" ;;+esacdiff --git a/.github/workflows/rust-check.yml b/.github/workflows/rust-check.ymlindex 6ff0899a0..96900cb45 100644--- a/.github/workflows/rust-check.yml+++ b/.github/workflows/rust-check.yml@@ -143,6 +143,53 @@ jobs:cargo test --locked --manifest-path src-tauri/jan-cli/Cargo.toml \--no-default-features --features cli --test adk_examples+ # `jan --version` on a build without JAN_CLI_BUILD_VERSION reports the+ # committed app version, so a bump that skips jan-cli or tauri.conf.json+ # ships a CLI naming the wrong release (janhq/jan-internal#454), and so does+ # a tree whose manifests agree but lag the last tag (0.8.5 through v0.8.8).+ # Release builds restamp all of them through the same script; this keeps the+ # committed tree honest for source builds. jq and git ls-remote, no toolchain.+ #+ # Disagreement always fails. A lag behind the latest tag fails only when the+ # change under test changes one of those version values (the script compares+ # them against --base), and is a warning otherwise: a tag is pushed before+ # its bump is committed, and that window must not turn main and every+ # unrelated open PR red, including one that only adds a dependency.+ versions:+ name: manifest versions agree and are released+ runs-on: ubuntu-latest+ steps:+ # A PR's checkout is the merge commit, so depth 2 brings its first+ # parent, the base tip it merges into.+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6+ with:+ fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 1 }}++ # Reading the manifests at the base needs no history between it and+ # HEAD, so a push only has to fetch its `before` commit. With no usable range (a new branch, a force+ # push whose old tip is gone, a manual dispatch) lag stays a warning.+ - name: Compare the app, CLI and Tauri manifest versions+ env:+ EVENT: ${{ github.event_name }}+ BEFORE: ${{ github.event.before }}+ run: |+ base=""+ case "$EVENT" in+ pull_request) base="$(git rev-parse HEAD^1)" ;;+ push)+ if [ -n "$BEFORE" ] && [ "$BEFORE" != 0000000000000000000000000000000000000000 ] &&+ git fetch --quiet --depth=1 origin "$BEFORE"; then+ base="$BEFORE"+ fi+ ;;+ esac+ if [ -n "$base" ]; then+ bash .github/scripts/stamp-version.sh --check --base "$base"+ else+ echo "no diff range for this $EVENT event; a lag behind the latest tag is a warning"+ bash .github/scripts/stamp-version.sh --check+ fi+# The deliverable of the schema work is this guard, not the file: a protocol# shape that changes without regenerating leaves every consumer validating# against a document that no longer describes the channel. The unit test indiff --git a/.github/workflows/template-tauri-build-linux-x64-external.yml b/.github/workflows/template-tauri-build-linux-x64-external.ymlindex 73730c5db..acfb5639c 100644--- a/.github/workflows/template-tauri-build-linux-x64-external.yml+++ b/.github/workflows/template-tauri-build-linux-x64-external.yml@@ -95,40 +95,15 @@ jobs:- name: Update app versionrun: |echo "Version: ${{ inputs.new_version }}"- jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = false' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json+ jq '.bundle.createUpdaterArtifacts = false' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.jsonmv /tmp/tauri.conf.json ./src-tauri/tauri.conf.jsonif [ "${{ inputs.channel }}" != "stable" ]; thenjq '.bundle.linux.deb.files = {"usr/bin/bun": "resources/bin/bun"}' ./src-tauri/tauri.linux.conf.json > /tmp/tauri.linux.conf.jsonmv /tmp/tauri.linux.conf.json ./src-tauri/tauri.linux.conf.jsonfi- jq --arg version "${{ inputs.new_version }}" '.version = $version' web-app/package.json > /tmp/package.json- mv /tmp/package.json web-app/package.json- # Update tauri plugin versions-- jq --arg version "${{ inputs.new_version }}" '.version = $version' ./src-tauri/plugins/tauri-plugin-hardware/package.json > /tmp/package.json- mv /tmp/package.json ./src-tauri/plugins/tauri-plugin-hardware/package.json-- echo "---------./src-tauri/plugins/tauri-plugin-hardware/package.json---------"- cat ./src-tauri/plugins/tauri-plugin-hardware/package.json-- jq --arg version "${{ inputs.new_version }}" '.version = $version' ./src-tauri/plugins/tauri-plugin-llamacpp/package.json > /tmp/package.json- mv /tmp/package.json ./src-tauri/plugins/tauri-plugin-llamacpp/package.json-- echo "---------./src-tauri/plugins/tauri-plugin-llamacpp/package.json---------"- cat ./src-tauri/plugins/tauri-plugin-llamacpp/package.json-- ctoml ./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml---------"- cat ./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml-- ctoml ./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml---------"- cat ./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml-- ctoml ./src-tauri/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/Cargo.toml---------"- cat ./src-tauri/Cargo.toml+ # Every version-bearing manifest, the jan CLI's included, in one place.+ bash .github/scripts/stamp-version.sh "${{ inputs.new_version }}"ctoml ./src-tauri/Cargo.toml dependencies.tauri.features[] "devtools"diff --git a/.github/workflows/template-tauri-build-linux-x64-flatpak.yml b/.github/workflows/template-tauri-build-linux-x64-flatpak.ymlindex 5ce262743..26b0b52b8 100644--- a/.github/workflows/template-tauri-build-linux-x64-flatpak.yml+++ b/.github/workflows/template-tauri-build-linux-x64-flatpak.yml@@ -113,40 +113,15 @@ jobs:run: |echo "Version: ${{ inputs.new_version }}"# Update tauri.conf.json- jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = true' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json+ jq '.bundle.createUpdaterArtifacts = true' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.jsonmv /tmp/tauri.conf.json ./src-tauri/tauri.conf.jsonif [ "${{ inputs.channel }}" != "stable" ]; thenjq '.bundle.linux.deb.files = {"usr/bin/bun": "resources/bin/bun"}' ./src-tauri/tauri.linux.conf.json > /tmp/tauri.linux.conf.jsonmv /tmp/tauri.linux.conf.json ./src-tauri/tauri.linux.conf.jsonfi- jq --arg version "${{ inputs.new_version }}" '.version = $version' web-app/package.json > /tmp/package.json- mv /tmp/package.json web-app/package.json- # Update tauri plugin versions-- jq --arg version "${{ inputs.new_version }}" '.version = $version' ./src-tauri/plugins/tauri-plugin-hardware/package.json > /tmp/package.json- mv /tmp/package.json ./src-tauri/plugins/tauri-plugin-hardware/package.json-- echo "---------./src-tauri/plugins/tauri-plugin-hardware/package.json---------"- cat ./src-tauri/plugins/tauri-plugin-hardware/package.json-- jq --arg version "${{ inputs.new_version }}" '.version = $version' ./src-tauri/plugins/tauri-plugin-llamacpp/package.json > /tmp/package.json- mv /tmp/package.json ./src-tauri/plugins/tauri-plugin-llamacpp/package.json-- echo "---------./src-tauri/plugins/tauri-plugin-llamacpp/package.json---------"- cat ./src-tauri/plugins/tauri-plugin-llamacpp/package.json-- ctoml ./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml---------"- cat ./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml-- ctoml ./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml---------"- cat ./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml-- ctoml ./src-tauri/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/Cargo.toml---------"- cat ./src-tauri/Cargo.toml+ # Every version-bearing manifest, the jan CLI's included, in one place.+ bash .github/scripts/stamp-version.sh "${{ inputs.new_version }}"# Temporarily enable devtool on prod buildctoml ./src-tauri/Cargo.toml dependencies.tauri.features[] "devtools"diff --git a/.github/workflows/template-tauri-build-linux-x64.yml b/.github/workflows/template-tauri-build-linux-x64.ymlindex 64c7b8be4..773cdf750 100644--- a/.github/workflows/template-tauri-build-linux-x64.yml+++ b/.github/workflows/template-tauri-build-linux-x64.yml@@ -139,40 +139,15 @@ jobs:run: |echo "Version: ${{ inputs.new_version }}"# Update tauri.conf.json- jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = true' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json+ jq '.bundle.createUpdaterArtifacts = true' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.jsonmv /tmp/tauri.conf.json ./src-tauri/tauri.conf.jsonif [ "${{ inputs.channel }}" != "stable" ]; thenjq '.bundle.linux.deb.files = {"usr/bin/bun": "resources/bin/bun"}' ./src-tauri/tauri.linux.conf.json > /tmp/tauri.linux.conf.jsonmv /tmp/tauri.linux.conf.json ./src-tauri/tauri.linux.conf.jsonfi- jq --arg version "${{ inputs.new_version }}" '.version = $version' web-app/package.json > /tmp/package.json- mv /tmp/package.json web-app/package.json- # Update tauri plugin versions-- jq --arg version "${{ inputs.new_version }}" '.version = $version' ./src-tauri/plugins/tauri-plugin-hardware/package.json > /tmp/package.json- mv /tmp/package.json ./src-tauri/plugins/tauri-plugin-hardware/package.json-- echo "---------./src-tauri/plugins/tauri-plugin-hardware/package.json---------"- cat ./src-tauri/plugins/tauri-plugin-hardware/package.json-- jq --arg version "${{ inputs.new_version }}" '.version = $version' ./src-tauri/plugins/tauri-plugin-llamacpp/package.json > /tmp/package.json- mv /tmp/package.json ./src-tauri/plugins/tauri-plugin-llamacpp/package.json-- echo "---------./src-tauri/plugins/tauri-plugin-llamacpp/package.json---------"- cat ./src-tauri/plugins/tauri-plugin-llamacpp/package.json-- ctoml ./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml---------"- cat ./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml-- ctoml ./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml---------"- cat ./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml-- ctoml ./src-tauri/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/Cargo.toml---------"- cat ./src-tauri/Cargo.toml+ # Every version-bearing manifest, the jan CLI's included, in one place.+ bash .github/scripts/stamp-version.sh "${{ inputs.new_version }}"# Temporarily enable devtool on prod buildctoml ./src-tauri/Cargo.toml dependencies.tauri.features[] "devtools"diff --git a/.github/workflows/template-tauri-build-macos-external.yml b/.github/workflows/template-tauri-build-macos-external.ymlindex aadf32637..4dfb9f503 100644--- a/.github/workflows/template-tauri-build-macos-external.yml+++ b/.github/workflows/template-tauri-build-macos-external.yml@@ -63,36 +63,11 @@ jobs:- name: Update app versionrun: |echo "Version: ${{ inputs.new_version }}"- jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = false' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json+ jq '.bundle.createUpdaterArtifacts = false' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.jsonmv /tmp/tauri.conf.json ./src-tauri/tauri.conf.json- jq --arg version "${{ inputs.new_version }}" '.version = $version' web-app/package.json > /tmp/package.json- mv /tmp/package.json web-app/package.json- # Update tauri plugin versions-- jq --arg version "${{ inputs.new_version }}" '.version = $version' ./src-tauri/plugins/tauri-plugin-hardware/package.json > /tmp/package.json- mv /tmp/package.json ./src-tauri/plugins/tauri-plugin-hardware/package.json-- echo "---------./src-tauri/plugins/tauri-plugin-hardware/package.json---------"- cat ./src-tauri/plugins/tauri-plugin-hardware/package.json-- jq --arg version "${{ inputs.new_version }}" '.version = $version' ./src-tauri/plugins/tauri-plugin-llamacpp/package.json > /tmp/package.json- mv /tmp/package.json ./src-tauri/plugins/tauri-plugin-llamacpp/package.json-- echo "---------./src-tauri/plugins/tauri-plugin-llamacpp/package.json---------"- cat ./src-tauri/plugins/tauri-plugin-llamacpp/package.json-- ctoml ./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml---------"- cat ./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml-- ctoml ./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml---------"- cat ./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml-- ctoml ./src-tauri/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/Cargo.toml---------"- cat ./src-tauri/Cargo.toml+ # Every version-bearing manifest, the jan CLI's included, in one place.+ bash .github/scripts/stamp-version.sh "${{ inputs.new_version }}"ctoml ./src-tauri/Cargo.toml dependencies.tauri.features[] "devtools"diff --git a/.github/workflows/template-tauri-build-macos.yml b/.github/workflows/template-tauri-build-macos.ymlindex f6f14fc22..aa38e4dad 100644--- a/.github/workflows/template-tauri-build-macos.yml+++ b/.github/workflows/template-tauri-build-macos.yml@@ -118,36 +118,11 @@ jobs:run: |echo "Version: ${{ inputs.new_version }}"# Update tauri.conf.json- jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = true' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json+ jq '.bundle.createUpdaterArtifacts = true' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.jsonmv /tmp/tauri.conf.json ./src-tauri/tauri.conf.json- jq --arg version "${{ inputs.new_version }}" '.version = $version' web-app/package.json > /tmp/package.json- mv /tmp/package.json web-app/package.json- # Update tauri plugin versions-- jq --arg version "${{ inputs.new_version }}" '.version = $version' ./src-tauri/plugins/tauri-plugin-hardware/package.json > /tmp/package.json- mv /tmp/package.json ./src-tauri/plugins/tauri-plugin-hardware/package.json-- echo "---------./src-tauri/plugins/tauri-plugin-hardware/package.json---------"- cat ./src-tauri/plugins/tauri-plugin-hardware/package.json-- jq --arg version "${{ inputs.new_version }}" '.version = $version' ./src-tauri/plugins/tauri-plugin-llamacpp/package.json > /tmp/package.json- mv /tmp/package.json ./src-tauri/plugins/tauri-plugin-llamacpp/package.json-- echo "---------./src-tauri/plugins/tauri-plugin-llamacpp/package.json---------"- cat ./src-tauri/plugins/tauri-plugin-llamacpp/package.json-- ctoml ./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml---------"- cat ./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml-- ctoml ./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml---------"- cat ./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml-- ctoml ./src-tauri/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/Cargo.toml---------"- cat ./src-tauri/Cargo.toml+ # Every version-bearing manifest, the jan CLI's included, in one place.+ bash .github/scripts/stamp-version.sh "${{ inputs.new_version }}"# Temporarily enable devtool on prod buildctoml ./src-tauri/Cargo.toml dependencies.tauri.features[] "devtools"diff --git a/.github/workflows/template-tauri-build-windows-arm64.yml b/.github/workflows/template-tauri-build-windows-arm64.ymlindex a8541ec13..367277daa 100644--- a/.github/workflows/template-tauri-build-windows-arm64.yml+++ b/.github/workflows/template-tauri-build-windows-arm64.yml@@ -348,9 +348,7 @@ jobs:- name: Update app version and product nameshell: bashrun: |- jq --arg version "$NEW_VERSION" \- '.version = $version | .bundle.createUpdaterArtifacts = true' \- ./src-tauri/tauri.conf.json > /tmp/c.json+ jq '.bundle.createUpdaterArtifacts = true' ./src-tauri/tauri.conf.json > /tmp/c.jsonmv /tmp/c.json ./src-tauri/tauri.conf.jsonjq '.bundle.targets = ["nsis"]@@ -359,16 +357,8 @@ jobs:./src-tauri/tauri.windows.conf.json > /tmp/w.jsonmv /tmp/w.json ./src-tauri/tauri.windows.conf.json- jq --arg version "$NEW_VERSION" '.version = $version' web-app/package.json > /tmp/p.json- mv /tmp/p.json web-app/package.json-- for p in hardware llamacpp; do- jq --arg version "$NEW_VERSION" '.version = $version' \- "./src-tauri/plugins/tauri-plugin-$p/package.json" > /tmp/p.json- mv /tmp/p.json "./src-tauri/plugins/tauri-plugin-$p/package.json"- ctoml "./src-tauri/plugins/tauri-plugin-$p/Cargo.toml" package.version "$NEW_VERSION"- done- ctoml ./src-tauri/Cargo.toml package.version "$NEW_VERSION"+ # Every version-bearing manifest, the jan CLI's included, in one place.+ bash .github/scripts/stamp-version.sh "$NEW_VERSION"if [ "$CHANNEL" != "stable" ]; then# Without this an arm64 nightly keeps tauri.conf.json's stablediff --git a/.github/workflows/template-tauri-build-windows-x64-external.yml b/.github/workflows/template-tauri-build-windows-x64-external.ymlindex ac3c74a0f..385c68c07 100644--- a/.github/workflows/template-tauri-build-windows-x64-external.yml+++ b/.github/workflows/template-tauri-build-windows-x64-external.yml@@ -63,40 +63,15 @@ jobs:run: |echo "Version: ${{ inputs.new_version }}"# Update tauri.conf.json- jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = false' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json+ jq '.bundle.createUpdaterArtifacts = false' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.jsonmv /tmp/tauri.conf.json ./src-tauri/tauri.conf.jsonjq '.bundle.windows.nsis.template = "tauri.bundle.windows.nsis.template"' ./src-tauri/tauri.windows.conf.json > /tmp/tauri.windows.conf.jsonmv /tmp/tauri.windows.conf.json ./src-tauri/tauri.windows.conf.jsonjq '.bundle.windows.signCommand = "echo External build - skipping signature: %1"' ./src-tauri/tauri.windows.conf.json > /tmp/tauri.windows.conf.jsonmv /tmp/tauri.windows.conf.json ./src-tauri/tauri.windows.conf.json- jq --arg version "${{ inputs.new_version }}" '.version = $version' web-app/package.json > /tmp/package.json- mv /tmp/package.json web-app/package.json- # Update tauri plugin versions-- jq --arg version "${{ inputs.new_version }}" '.version = $version' ./src-tauri/plugins/tauri-plugin-hardware/package.json > /tmp/package.json- mv /tmp/package.json ./src-tauri/plugins/tauri-plugin-hardware/package.json-- echo "---------./src-tauri/plugins/tauri-plugin-hardware/package.json---------"- cat ./src-tauri/plugins/tauri-plugin-hardware/package.json-- jq --arg version "${{ inputs.new_version }}" '.version = $version' ./src-tauri/plugins/tauri-plugin-llamacpp/package.json > /tmp/package.json- mv /tmp/package.json ./src-tauri/plugins/tauri-plugin-llamacpp/package.json-- echo "---------./src-tauri/plugins/tauri-plugin-llamacpp/package.json---------"- cat ./src-tauri/plugins/tauri-plugin-llamacpp/package.json-- ctoml ./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml---------"- cat ./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml-- ctoml ./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml---------"- cat ./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml-- ctoml ./src-tauri/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/Cargo.toml---------"- cat ./src-tauri/Cargo.toml+ # Every version-bearing manifest, the jan CLI's included, in one place.+ bash .github/scripts/stamp-version.sh "${{ inputs.new_version }}"generate_build_version() {### Examblediff --git a/.github/workflows/template-tauri-build-windows-x64.yml b/.github/workflows/template-tauri-build-windows-x64.ymlindex eeabc29d6..e45cb0f55 100644--- a/.github/workflows/template-tauri-build-windows-x64.yml+++ b/.github/workflows/template-tauri-build-windows-x64.yml@@ -150,12 +150,10 @@ jobs:run: |echo "Version: ${{ inputs.new_version }}"# Update tauri.conf.json- jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = true' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json+ jq '.bundle.createUpdaterArtifacts = true' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.jsonmv /tmp/tauri.conf.json ./src-tauri/tauri.conf.jsonjq '.bundle.windows.nsis.template = "tauri.bundle.windows.nsis.template"' ./src-tauri/tauri.windows.conf.json > /tmp/tauri.windows.conf.jsonmv /tmp/tauri.windows.conf.json ./src-tauri/tauri.windows.conf.json- jq --arg version "${{ inputs.new_version }}" '.version = $version' web-app/package.json > /tmp/package.json- mv /tmp/package.json web-app/package.json# MSI's version field is major.minor.patch.build with a numeric build,# so a prerelease it cannot express -- non-numeric like 0.8.5-rc1-beta,@@ -184,31 +182,8 @@ jobs:jq '.bundle.windows.signCommand = "powershell -ExecutionPolicy Bypass -File ./sign.ps1 %1"' ./src-tauri/tauri.windows.conf.json > /tmp/tauri.windows.conf.jsonmv /tmp/tauri.windows.conf.json ./src-tauri/tauri.windows.conf.json- # Update tauri plugin versions-- jq --arg version "${{ inputs.new_version }}" '.version = $version' ./src-tauri/plugins/tauri-plugin-hardware/package.json > /tmp/package.json- mv /tmp/package.json ./src-tauri/plugins/tauri-plugin-hardware/package.json-- echo "---------./src-tauri/plugins/tauri-plugin-hardware/package.json---------"- cat ./src-tauri/plugins/tauri-plugin-hardware/package.json-- jq --arg version "${{ inputs.new_version }}" '.version = $version' ./src-tauri/plugins/tauri-plugin-llamacpp/package.json > /tmp/package.json- mv /tmp/package.json ./src-tauri/plugins/tauri-plugin-llamacpp/package.json-- echo "---------./src-tauri/plugins/tauri-plugin-llamacpp/package.json---------"- cat ./src-tauri/plugins/tauri-plugin-llamacpp/package.json-- ctoml ./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml---------"- cat ./src-tauri/plugins/tauri-plugin-hardware/Cargo.toml-- ctoml ./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml---------"- cat ./src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml-- ctoml ./src-tauri/Cargo.toml package.version "${{ inputs.new_version }}"- echo "---------./src-tauri/Cargo.toml---------"- cat ./src-tauri/Cargo.toml+ # Every version-bearing manifest, the jan CLI's included, in one place.+ bash .github/scripts/stamp-version.sh "${{ inputs.new_version }}"generate_build_version() {### Examplediff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lockindex f75911576..e6599a667 100644--- a/src-tauri/Cargo.lock+++ b/src-tauri/Cargo.lock@@ -4,7 +4,7 @@ version = 4[[package]]name = "Jan"-version = "0.8.5"+version = "0.8.8"dependencies = ["aes-gcm","agent-client-protocol",diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.tomlindex d3042c287..6d45db017 100644--- a/src-tauri/Cargo.toml+++ b/src-tauri/Cargo.toml@@ -1,6 +1,6 @@[package]name = "Jan"-version = "0.8.5"+version = "0.8.8"description = "Use offline LLMs with your own data. Run open source models like Llama2 or Falcon on your internal computers/servers."authors = ["Jan <[email protected]>"]license = "Apache-2.0"diff --git a/src-tauri/jan-cli/Cargo.lock b/src-tauri/jan-cli/Cargo.lockindex b054fdeff..d6a559fd1 100644--- a/src-tauri/jan-cli/Cargo.lock+++ b/src-tauri/jan-cli/Cargo.lock@@ -4,7 +4,7 @@ version = 4[[package]]name = "Jan"-version = "0.8.5"+version = "0.8.8"dependencies = ["aes-gcm","agent-client-protocol",@@ -2543,7 +2543,7 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"[[package]]name = "jan-cli"-version = "0.8.5"+version = "0.8.8"dependencies = ["Jan","chrono",diff --git a/src-tauri/jan-cli/Cargo.toml b/src-tauri/jan-cli/Cargo.tomlindex 06544657b..bf3e8303e 100644--- a/src-tauri/jan-cli/Cargo.toml+++ b/src-tauri/jan-cli/Cargo.toml@@ -1,6 +1,6 @@[package]name = "jan-cli"-version = "0.8.5"+version = "0.8.8"description = "Headless CLI for Jan: chat with remote AI models in an interactive agent console."authors = ["Jan <[email protected]>"]license = "Apache-2.0"diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.jsonindex c3957dcb1..617c2fff9 100644--- a/src-tauri/tauri.conf.json+++ b/src-tauri/tauri.conf.json@@ -2,7 +2,7 @@"$schema": "https://schema.tauri.app/config/2","productName": "Jan","mainBinaryName": "Jan-Desktop",- "version": "0.8.5",+ "version": "0.8.8","identifier": "jan.ai.app","build": {"frontendDist": "../web-app/dist",diff --git a/tests/checklist.md b/tests/checklist.mdindex db7281893..0efb213d7 100644--- a/tests/checklist.md+++ b/tests/checklist.md@@ -183,6 +183,7 @@ Ensure that the following section information show up for hardware- [ ] [0.6.10] Make sure you are still able to see API key when server local status is running- [ ] [0.7.0] Users can see the Jan API Server Swagger UI by opening the following path in their browser `http://<ip>:<port>`- [ ] [0.8.5] Jan CLI commands work: `jan serve`, `jan models list`, `jan acp` (experimental, gated by JAN_EXPERIMENTAL_ACP=1)+- [ ] [0.8.8] `jan --version` on the CLI built for this release prints the release tag's version (e.g. `jan 0.8.8` for `v0.8.8`), not an older one- [ ] [0.7.0] Users can set the trusted host to * in the server configuration to accept requests from all host or without host#### In `HTTPS Proxy`:- [ ] Model download request goes through proxy endpoint