Skip to content
Snippets Groups Projects
Unverified Commit d5192e22 authored by GyDi's avatar GyDi
Browse files

feat: windows portable version do not check update

parent 7eb59517
No related branches found
No related tags found
No related merge requests found
...@@ -77,10 +77,15 @@ jobs: ...@@ -77,10 +77,15 @@ jobs:
- name: Portable Bundle - name: Portable Bundle
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
# rebuild with env settings
run: | run: |
yarn build
yarn run portable yarn run portable
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
VITE_WIN_PORTABLE: 1
release-update: release-update:
needs: release needs: release
......
...@@ -22,6 +22,10 @@ import useCustomTheme from "@/components/layout/use-custom-theme"; ...@@ -22,6 +22,10 @@ import useCustomTheme from "@/components/layout/use-custom-theme";
import getSystem from "@/utils/get-system"; import getSystem from "@/utils/get-system";
import "dayjs/locale/zh-cn"; import "dayjs/locale/zh-cn";
declare global {
const WIN_PORTABLE: boolean;
}
dayjs.extend(relativeTime); dayjs.extend(relativeTime);
const OS = getSystem(); const OS = getSystem();
...@@ -87,7 +91,9 @@ const Layout = () => { ...@@ -87,7 +91,9 @@ const Layout = () => {
<div className="the-logo" data-windrag> <div className="the-logo" data-windrag>
<LogoSvg /> <LogoSvg />
<UpdateButton className="the-newbtn" /> {!(OS === "windows" && WIN_PORTABLE) && (
<UpdateButton className="the-newbtn" />
)}
</div> </div>
<List className="the-menu"> <List className="the-menu">
......
...@@ -22,4 +22,7 @@ export default defineConfig({ ...@@ -22,4 +22,7 @@ export default defineConfig({
"@root": path.resolve("."), "@root": path.resolve("."),
}, },
}, },
define: {
WIN_PORTABLE: !!process.env.VITE_WIN_PORTABLE,
},
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment