Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
refactor(ci): name the desktop executable Jan-Desktop on every channel
Akarshan Biswasd0b10c50a0da
diff --git a/.github/scripts/rename-tauri-app.sh b/.github/scripts/rename-tauri-app.shindex 80dd83937..abec0c33f 100644--- a/.github/scripts/rename-tauri-app.sh+++ b/.github/scripts/rename-tauri-app.sh@@ -26,7 +26,7 @@ fijq --arg channel "$CHANNEL" --arg updater "$UPDATER" '.productName = "Jan-\($channel)" |.identifier = "jan-\($channel).ai.app" |- .mainBinaryName = "Jan-\($channel)"+ .mainBinaryName = "Jan-Desktop-\($channel)"' "$INPUT_JSON_FILE" > ./tauri.conf.json.tmpcat ./tauri.conf.json.tmp@@ -34,15 +34,16 @@ cat ./tauri.conf.json.tmprm $INPUT_JSON_FILEmv ./tauri.conf.json.tmp $INPUT_JSON_FILE-# mainBinaryName must name a real Cargo bin target, so the desktop bin and-# `default-run` have to be renamed with it. The workflow's ctoml call owns-# `default-run`; the target itself only exists here.+# mainBinaryName has to name a real Cargo bin target, and `default-run` has to+# name the same one, so all three move together or the manifest stops parsing.CARGO_TOML_PATH="$(dirname "$INPUT_JSON_FILE")/Cargo.toml"if [ -f "$CARGO_TOML_PATH" ]; thenecho "Renaming the desktop bin target in $CARGO_TOML_PATH..."- sed "s|^name = \"jan-desktop\"$|name = \"Jan-${CHANNEL}\"|" "$CARGO_TOML_PATH" > ./Cargo.toml.tmp+ sed -e "s|^name = \"Jan-Desktop\"$|name = \"Jan-Desktop-${CHANNEL}\"|" \+ -e "s|^default-run = \"Jan-Desktop\"$|default-run = \"Jan-Desktop-${CHANNEL}\"|" \+ "$CARGO_TOML_PATH" > ./Cargo.toml.tmpmv ./Cargo.toml.tmp "$CARGO_TOML_PATH"- grep -n "^name = \"Jan-${CHANNEL}\"$" "$CARGO_TOML_PATH"+ grep -c "Jan-Desktop-${CHANNEL}" "$CARGO_TOML_PATH"fi# Update Info.plist if it existsdiff --git a/.github/workflows/autoqa-template.yml b/.github/workflows/autoqa-template.ymlindex 37df4a561..87a9601d3 100644--- a/.github/workflows/autoqa-template.yml+++ b/.github/workflows/autoqa-template.yml@@ -233,9 +233,9 @@ jobs:echo "JAN_APP_PATH=/tmp/jan-installer.deb" >> $GITHUB_ENVecho "IS_NIGHTLY=${{ inputs.is_nightly }}" >> $GITHUB_ENVif [ "${{ inputs.is_nightly }}" = "true" ]; then- echo "JAN_PROCESS_NAME=Jan-nightly" >> $GITHUB_ENV+ echo "JAN_PROCESS_NAME=Jan-Desktop-nightly" >> $GITHUB_ENVelse- echo "JAN_PROCESS_NAME=Jan" >> $GITHUB_ENV+ echo "JAN_PROCESS_NAME=Jan-Desktop" >> $GITHUB_ENVfielseecho "[FAILED] No .deb file found in artifact"@@ -254,9 +254,9 @@ jobs:# Set the correct environment variables for the test runnerecho "JAN_APP_PATH=/tmp/jan-installer.deb" >> $GITHUB_ENVif [ "${{ inputs.is_nightly }}" = "true" ]; then- echo "JAN_PROCESS_NAME=Jan-nightly" >> $GITHUB_ENV+ echo "JAN_PROCESS_NAME=Jan-Desktop-nightly" >> $GITHUB_ENVelse- echo "JAN_PROCESS_NAME=Jan" >> $GITHUB_ENV+ echo "JAN_PROCESS_NAME=Jan-Desktop" >> $GITHUB_ENVfifi@@ -355,9 +355,9 @@ jobs:echo "JAN_APP_PATH=/tmp/jan-installer.dmg" >> $GITHUB_ENVecho "IS_NIGHTLY=${{ inputs.is_nightly }}" >> $GITHUB_ENVif [ "${{ inputs.is_nightly }}" = "true" ]; then- echo "PROCESS_NAME=Jan-nightly" >> $GITHUB_ENV+ echo "PROCESS_NAME=Jan-Desktop-nightly" >> $GITHUB_ENVelse- echo "PROCESS_NAME=Jan" >> $GITHUB_ENV+ echo "PROCESS_NAME=Jan-Desktop" >> $GITHUB_ENVfielseecho "[FAILED] No .dmg file found in artifact"@@ -376,9 +376,9 @@ jobs:# Set the correct environment variables for the test runnerecho "JAN_APP_PATH=/tmp/jan-installer.dmg" >> $GITHUB_ENVif [ "${{ inputs.is_nightly }}" = "true" ]; then- echo "PROCESS_NAME=Jan-nightly" >> $GITHUB_ENV+ echo "PROCESS_NAME=Jan-Desktop-nightly" >> $GITHUB_ENVelse- echo "PROCESS_NAME=Jan" >> $GITHUB_ENV+ echo "PROCESS_NAME=Jan-Desktop" >> $GITHUB_ENVfifidiff --git a/.github/workflows/template-tauri-build-linux-x64-external.yml b/.github/workflows/template-tauri-build-linux-x64-external.ymlindex 2c6c03948..735333e6f 100644--- a/.github/workflows/template-tauri-build-linux-x64-external.yml+++ b/.github/workflows/template-tauri-build-linux-x64-external.yml@@ -141,7 +141,6 @@ jobs:chmod +x .github/scripts/rename-tauri-app.sh.github/scripts/rename-tauri-app.sh ./src-tauri/tauri.conf.json ${{ inputs.channel }}ctoml ./src-tauri/Cargo.toml package.name "Jan-${{ inputs.channel }}"- ctoml ./src-tauri/Cargo.toml package.default-run "Jan-${{ inputs.channel }}"ctoml ./src-tauri/Cargo.toml dependencies.tauri.features[] "devtools"chmod +x .github/scripts/rename-workspace.sh.github/scripts/rename-workspace.sh ./package.json ${{ inputs.channel }}diff --git a/.github/workflows/template-tauri-build-linux-x64-flatpak.yml b/.github/workflows/template-tauri-build-linux-x64-flatpak.ymlindex ee0563409..292832820 100644--- a/.github/workflows/template-tauri-build-linux-x64-flatpak.yml+++ b/.github/workflows/template-tauri-build-linux-x64-flatpak.yml@@ -167,7 +167,6 @@ jobs:# Update Cargo.tomlctoml ./src-tauri/Cargo.toml package.name "Jan-${{ inputs.channel }}"- ctoml ./src-tauri/Cargo.toml package.default-run "Jan-${{ inputs.channel }}"ctoml ./src-tauri/Cargo.toml dependencies.tauri.features[] "devtools"echo "------------------"cat ./src-tauri/Cargo.tomldiff --git a/.github/workflows/template-tauri-build-linux-x64.yml b/.github/workflows/template-tauri-build-linux-x64.ymlindex 538514b6f..4cb4fc809 100644--- a/.github/workflows/template-tauri-build-linux-x64.yml+++ b/.github/workflows/template-tauri-build-linux-x64.yml@@ -189,7 +189,6 @@ jobs:# Update Cargo.tomlctoml ./src-tauri/Cargo.toml package.name "Jan-${{ inputs.channel }}"- ctoml ./src-tauri/Cargo.toml package.default-run "Jan-${{ inputs.channel }}"ctoml ./src-tauri/Cargo.toml dependencies.tauri.features[] "devtools"echo "------------------"cat ./src-tauri/Cargo.tomldiff --git a/.github/workflows/template-tauri-build-macos-external.yml b/.github/workflows/template-tauri-build-macos-external.ymlindex 3ef151856..42a34d107 100644--- a/.github/workflows/template-tauri-build-macos-external.yml+++ b/.github/workflows/template-tauri-build-macos-external.yml@@ -106,7 +106,6 @@ jobs:chmod +x .github/scripts/rename-tauri-app.sh.github/scripts/rename-tauri-app.sh ./src-tauri/tauri.conf.json ${{ inputs.channel }}ctoml ./src-tauri/Cargo.toml package.name "Jan-${{ inputs.channel }}"- ctoml ./src-tauri/Cargo.toml package.default-run "Jan-${{ inputs.channel }}"ctoml ./src-tauri/Cargo.toml dependencies.tauri.features[] "devtools"chmod +x .github/scripts/rename-workspace.sh.github/scripts/rename-workspace.sh ./package.json ${{ inputs.channel }}diff --git a/.github/workflows/template-tauri-build-macos.yml b/.github/workflows/template-tauri-build-macos.ymlindex 887db6652..a5437a180 100644--- a/.github/workflows/template-tauri-build-macos.yml+++ b/.github/workflows/template-tauri-build-macos.yml@@ -167,7 +167,6 @@ jobs:# Update Cargo.tomlctoml ./src-tauri/Cargo.toml package.name "Jan-${{ inputs.channel }}"- ctoml ./src-tauri/Cargo.toml package.default-run "Jan-${{ inputs.channel }}"ctoml ./src-tauri/Cargo.toml dependencies.tauri.features[] "devtools"echo "------------------"cat ./src-tauri/Cargo.tomldiff --git a/.github/workflows/template-tauri-build-windows-x64-external.yml b/.github/workflows/template-tauri-build-windows-x64-external.ymlindex 6b0ac3bb0..3269cf8c5 100644--- a/.github/workflows/template-tauri-build-windows-x64-external.yml+++ b/.github/workflows/template-tauri-build-windows-x64-external.yml@@ -148,7 +148,6 @@ jobs:# Update Cargo.tomlctoml ./src-tauri/Cargo.toml package.name "Jan-${{ inputs.channel }}"- ctoml ./src-tauri/Cargo.toml package.default-run "Jan-${{ inputs.channel }}"ctoml ./src-tauri/Cargo.toml dependencies.tauri.features[] "devtools"echo "------------------"cat ./src-tauri/Cargo.toml@@ -157,11 +156,11 @@ jobs:.github/scripts/rename-workspace.sh ./package.json ${{ inputs.channel }}cat ./package.jsonsed -i "s/jan_productname/Jan-${{ inputs.channel }}/g" ./src-tauri/tauri.bundle.windows.nsis.template- sed -i "s/jan_mainbinaryname/Jan-${{ inputs.channel }}/g" ./src-tauri/tauri.bundle.windows.nsis.template+ sed -i "s/jan_mainbinaryname/Jan-Desktop-${{ inputs.channel }}/g" ./src-tauri/tauri.bundle.windows.nsis.templatesed -i "s/jan_bundleid/jan-${{ inputs.channel }}.ai.app/g" ./src-tauri/tauri.bundle.windows.nsis.templateelsesed -i "s/jan_productname/Jan/g" ./src-tauri/tauri.bundle.windows.nsis.template- sed -i "s/jan_mainbinaryname/jan-desktop/g" ./src-tauri/tauri.bundle.windows.nsis.template+ sed -i "s/jan_mainbinaryname/Jan-Desktop/g" ./src-tauri/tauri.bundle.windows.nsis.templatesed -i "s/jan_bundleid/jan.ai.app/g" ./src-tauri/tauri.bundle.windows.nsis.templatefiecho "---------nsis.template---------"diff --git a/.github/workflows/template-tauri-build-windows-x64.yml b/.github/workflows/template-tauri-build-windows-x64.ymlindex b967e4bea..17c8fc011 100644--- a/.github/workflows/template-tauri-build-windows-x64.yml+++ b/.github/workflows/template-tauri-build-windows-x64.yml@@ -216,7 +216,6 @@ jobs:# Update Cargo.tomlctoml ./src-tauri/Cargo.toml package.name "Jan-${{ inputs.channel }}"- ctoml ./src-tauri/Cargo.toml package.default-run "Jan-${{ inputs.channel }}"ctoml ./src-tauri/Cargo.toml dependencies.tauri.features[] "devtools"echo "------------------"cat ./src-tauri/Cargo.toml@@ -225,11 +224,11 @@ jobs:.github/scripts/rename-workspace.sh ./package.json ${{ inputs.channel }}cat ./package.jsonsed -i "s/jan_productname/Jan-${{ inputs.channel }}/g" ./src-tauri/tauri.bundle.windows.nsis.template- sed -i "s/jan_mainbinaryname/Jan-${{ inputs.channel }}/g" ./src-tauri/tauri.bundle.windows.nsis.template+ sed -i "s/jan_mainbinaryname/Jan-Desktop-${{ inputs.channel }}/g" ./src-tauri/tauri.bundle.windows.nsis.templatesed -i "s/jan_bundleid/jan-${{ inputs.channel }}.ai.app/g" ./src-tauri/tauri.bundle.windows.nsis.templateelsesed -i "s/jan_productname/Jan/g" ./src-tauri/tauri.bundle.windows.nsis.template- sed -i "s/jan_mainbinaryname/jan-desktop/g" ./src-tauri/tauri.bundle.windows.nsis.template+ sed -i "s/jan_mainbinaryname/Jan-Desktop/g" ./src-tauri/tauri.bundle.windows.nsis.templatesed -i "s/jan_bundleid/jan.ai.app/g" ./src-tauri/tauri.bundle.windows.nsis.templatefiecho "---------nsis.template---------"diff --git a/autoqa/scripts/run_tests.sh b/autoqa/scripts/run_tests.shindex 9b29415a5..89bbb15a8 100644--- a/autoqa/scripts/run_tests.sh+++ b/autoqa/scripts/run_tests.sh@@ -32,11 +32,11 @@ if [ "$PLATFORM" = "ubuntu" ]; then}# Make Jan executable if needed- if [ -f "/usr/bin/Jan-nightly" ]; then- sudo chmod +x /usr/bin/Jan-nightly+ if [ -f "/usr/bin/Jan-Desktop-nightly" ]; then+ sudo chmod +x /usr/bin/Jan-Desktop-nightlyfi- if [ -f "/usr/bin/Jan" ]; then- sudo chmod +x /usr/bin/Jan+ if [ -f "/usr/bin/Jan-Desktop" ]; then+ sudo chmod +x /usr/bin/Jan-Desktopfifidiff --git a/autoqa/scripts/ubuntu_install.sh b/autoqa/scripts/ubuntu_install.shindex bbfc30d3a..9d9ef2053 100644--- a/autoqa/scripts/ubuntu_install.sh+++ b/autoqa/scripts/ubuntu_install.sh@@ -22,11 +22,11 @@ echo "[SUCCESS] Initialization wait completed"# Verify installation based on nightly flagif [ "$IS_NIGHTLY" = "true" ]; then- DEFAULT_JAN_PATH="/usr/bin/Jan-nightly"- PROCESS_NAME="Jan-nightly"+ DEFAULT_JAN_PATH="/usr/bin/Jan-Desktop-nightly"+ PROCESS_NAME="Jan-Desktop-nightly"else- DEFAULT_JAN_PATH="/usr/bin/Jan"- PROCESS_NAME="Jan"+ DEFAULT_JAN_PATH="/usr/bin/Jan-Desktop"+ PROCESS_NAME="Jan-Desktop"fiif [ -f "$DEFAULT_JAN_PATH" ]; thendiff --git a/autoqa/scripts/windows_install.ps1 b/autoqa/scripts/windows_install.ps1index 1ccecef37..677b51341 100644--- a/autoqa/scripts/windows_install.ps1+++ b/autoqa/scripts/windows_install.ps1@@ -31,11 +31,11 @@ Write-Host "[SUCCESS] Initialization wait completed"# Verify installation based on nightly flagif ($isNightly) {- $defaultJanPath = "$env:LOCALAPPDATA\Programs\jan-nightly\Jan-nightly.exe"- $processName = "Jan-nightly.exe"+ $defaultJanPath = "$env:LOCALAPPDATA\Programs\jan-nightly\Jan-Desktop-nightly.exe"+ $processName = "Jan-Desktop-nightly.exe"} else {- $defaultJanPath = "$env:LOCALAPPDATA\Programs\jan\Jan.exe"- $processName = "Jan.exe"+ $defaultJanPath = "$env:LOCALAPPDATA\Programs\jan\Jan-Desktop.exe"+ $processName = "Jan-Desktop.exe"}if (Test-Path $defaultJanPath) {diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.tomlindex 4e7d5d06e..fb4627d1d 100644--- a/src-tauri/Cargo.toml+++ b/src-tauri/Cargo.toml@@ -10,14 +10,14 @@ edition = "2021"# Below that the previous floor was 1.82, for `Option::is_none_or` in agent/loop.rs.rust-version = "1.85"resolver = "2"-default-run = "jan-desktop"+default-run = "Jan-Desktop"[lib]name = "app_lib"crate-type = ["staticlib", "cdylib", "rlib"][[bin]]-name = "jan-desktop"+name = "Jan-Desktop"path = "src/main.rs"required-features = ["desktop"]diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.jsonindex f4d9d2832..a4324cbf5 100644--- a/src-tauri/tauri.conf.json+++ b/src-tauri/tauri.conf.json@@ -1,7 +1,7 @@{"$schema": "https://schema.tauri.app/config/2","productName": "Jan",- "mainBinaryName": "jan-desktop",+ "mainBinaryName": "Jan-Desktop","version": "0.8.4","identifier": "jan.ai.app","build": {