Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

ci: move config yarn makefile to ci

Minh141120d04ea491a34d
diff --git a/.github/workflows/jan-linter-and-test.yml b/.github/workflows/jan-linter-and-test.yml
index 43f30dcbc..ab9a8ea38 100644
--- a/.github/workflows/jan-linter-and-test.yml
+++ b/.github/workflows/jan-linter-and-test.yml
@@ -88,6 +88,13 @@ jobs:
rm -rf ~/jan
make clean
+ - name: Config Yarn
+ run: |
+ corepack enable
+ corepack prepare [email protected] --activate
+ yarn --version
+ yarn config set -H enableImmutableInstalls false
+
- name: Linter and test
run: |
make test
@@ -125,6 +132,13 @@ jobs:
}
make clean
+ - name: Config Yarn
+ run: |
+ corepack enable
+ corepack prepare [email protected] --activate
+ yarn --version
+ yarn config set -H enableImmutableInstalls false
+
- name: Linter and test
shell: powershell
run: |
@@ -166,6 +180,13 @@ jobs:
Invoke-WebRequest -Uri 'https://go.microsoft.com/fwlink/p/?LinkId=2124703' -OutFile 'setup.exe'
Start-Process -FilePath setup.exe -Verb RunAs -Wait
+ - name: Config Yarn
+ run: |
+ corepack enable
+ corepack prepare [email protected] --activate
+ yarn --version
+ yarn config set -H enableImmutableInstalls false
+
- name: Linter and test
shell: powershell
run: |
@@ -209,6 +230,13 @@ jobs:
rm -rf ~/jan
make clean
+ - name: Config Yarn
+ run: |
+ corepack enable
+ corepack prepare [email protected] --activate
+ yarn --version
+ yarn config set -H enableImmutableInstalls false
+
- name: Linter and test
run: |
export DISPLAY=$(w -h | awk 'NR==1 {print $2}')
@@ -243,6 +271,13 @@ jobs:
rm -rf ~/jan
make clean
+ - name: Config Yarn
+ run: |
+ corepack enable
+ corepack prepare [email protected] --activate
+ yarn --version
+ yarn config set -H enableImmutableInstalls false
+
- name: Install dependencies
run: |
make lint
diff --git a/.github/workflows/template-tauri-build-linux-x64-external.yml b/.github/workflows/template-tauri-build-linux-x64-external.yml
index 501bb497c..c508e94df 100644
--- a/.github/workflows/template-tauri-build-linux-x64-external.yml
+++ b/.github/workflows/template-tauri-build-linux-x64-external.yml
@@ -121,6 +121,13 @@ jobs:
.github/scripts/rename-workspace.sh ./package.json ${{ inputs.channel }}
fi
+ - name: Config Yarn
+ run: |
+ corepack enable
+ corepack prepare [email protected] --activate
+ yarn --version
+ yarn config set -H enableImmutableInstalls false
+
- name: Build app
run: |
make build
diff --git a/.github/workflows/template-tauri-build-linux-x64-flatpak.yml b/.github/workflows/template-tauri-build-linux-x64-flatpak.yml
index 7fc2cf9af..4bb318145 100644
--- a/.github/workflows/template-tauri-build-linux-x64-flatpak.yml
+++ b/.github/workflows/template-tauri-build-linux-x64-flatpak.yml
@@ -151,6 +151,14 @@ jobs:
.github/scripts/rename-workspace.sh ./package.json ${{ inputs.channel }}
cat ./package.json
fi
+
+ - name: Config Yarn
+ run: |
+ corepack enable
+ corepack prepare [email protected] --activate
+ yarn --version
+ yarn config set -H enableImmutableInstalls false
+
- name: Build app
run: |
make build
diff --git a/.github/workflows/template-tauri-build-linux-x64.yml b/.github/workflows/template-tauri-build-linux-x64.yml
index 4c2a2204d..afe4975d4 100644
--- a/.github/workflows/template-tauri-build-linux-x64.yml
+++ b/.github/workflows/template-tauri-build-linux-x64.yml
@@ -172,6 +172,14 @@ jobs:
.github/scripts/rename-workspace.sh ./package.json ${{ inputs.channel }}
cat ./package.json
fi
+
+ - name: Config Yarn
+ run: |
+ corepack enable
+ corepack prepare [email protected] --activate
+ yarn --version
+ yarn config set -H enableImmutableInstalls false
+
- name: Build app
run: |
make build
diff --git a/.github/workflows/template-tauri-build-macos-external.yml b/.github/workflows/template-tauri-build-macos-external.yml
index cce4ba078..adc8543dc 100644
--- a/.github/workflows/template-tauri-build-macos-external.yml
+++ b/.github/workflows/template-tauri-build-macos-external.yml
@@ -93,6 +93,13 @@ jobs:
.github/scripts/rename-workspace.sh ./package.json ${{ inputs.channel }}
fi
+ - name: Config Yarn
+ run: |
+ corepack enable
+ corepack prepare [email protected] --activate
+ yarn --version
+ yarn config set -H enableImmutableInstalls false
+
- name: Build app
run: |
make build
diff --git a/.github/workflows/template-tauri-build-macos.yml b/.github/workflows/template-tauri-build-macos.yml
index bb7515f82..613ab1b21 100644
--- a/.github/workflows/template-tauri-build-macos.yml
+++ b/.github/workflows/template-tauri-build-macos.yml
@@ -169,6 +169,13 @@ jobs:
p12-file-base64: ${{ secrets.CODE_SIGN_P12_BASE64 }}
p12-password: ${{ secrets.CODE_SIGN_P12_PASSWORD }}
+ - name: Config Yarn
+ run: |
+ corepack enable
+ corepack prepare [email protected] --activate
+ yarn --version
+ yarn config set -H enableImmutableInstalls false
+
- name: Build app
run: |
make build
diff --git a/.github/workflows/template-tauri-build-windows-x64-external.yml b/.github/workflows/template-tauri-build-windows-x64-external.yml
index d6474410d..91aaa95a9 100644
--- a/.github/workflows/template-tauri-build-windows-x64-external.yml
+++ b/.github/workflows/template-tauri-build-windows-x64-external.yml
@@ -147,6 +147,14 @@ jobs:
fi
echo "---------nsis.template---------"
cat ./src-tauri/tauri.bundle.windows.nsis.template
+
+ - name: Config Yarn
+ run: |
+ corepack enable
+ corepack prepare [email protected] --activate
+ yarn --version
+ yarn config set -H enableImmutableInstalls false
+
- name: Build app
shell: bash
run: |
diff --git a/.github/workflows/template-tauri-build-windows-x64.yml b/.github/workflows/template-tauri-build-windows-x64.yml
index ed897dee6..93163ef68 100644
--- a/.github/workflows/template-tauri-build-windows-x64.yml
+++ b/.github/workflows/template-tauri-build-windows-x64.yml
@@ -216,6 +216,13 @@ jobs:
run: |
dotnet tool install --global --version 6.0.0 AzureSignTool
+ - name: Config Yarn
+ run: |
+ corepack enable
+ corepack prepare [email protected] --activate
+ yarn --version
+ yarn config set -H enableImmutableInstalls false
+
- name: Build app
shell: bash
run: |
diff --git a/Makefile b/Makefile
index 6a317d3c6..1e3258a9f 100644
--- a/Makefile
+++ b/Makefile
@@ -10,16 +10,8 @@ REPORT_PORTAL_DESCRIPTION ?= "Jan App report"
all:
@echo "Specify a target to run"
-# Config yarn version
-
-config-yarn:
- corepack enable
- corepack prepare [email protected] --activate
- yarn --version
- yarn config set -H enableImmutableInstalls false
-
# Installs yarn dependencies and builds core and extensions
-install-and-build: config-yarn
+install-and-build:
ifeq ($(OS),Windows_NT)
echo "skip"
else ifeq ($(shell uname -s),Linux)
@@ -63,7 +55,7 @@ dev: install-and-build
yarn dev
# Web application targets
-install-web-app: config-yarn
+install-web-app:
yarn install
dev-web-app: install-web-app