Skip to content

Commit

Permalink
fix windows binary artifacts name
Browse files Browse the repository at this point in the history
Signed-off-by: seven <[email protected]>
  • Loading branch information
Blankll committed Feb 20, 2024
1 parent c9320a0 commit 42836f9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,4 @@ jobs:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
files: |
LICENSE
out/make/**/*.{dmg,rpm,deb}
out/make/**/*Setup.exe
out/make/**/*.{dmg,rpm,deb,Setup.exe}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "DocKit",
"productName": "DocKit",
"private": true,
"version": "0.1.0",
"version": "0.1.1",
"description": "A faster, better and more stable NoSQL desktop tools",
"author": "geekfun <[email protected]>",
"license": "Apache-2.0",
Expand Down
7 changes: 7 additions & 0 deletions scripts/make-distributions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@ echo "make distributions, platform: ${platform}"
npx electron-forge make --arch="x64" --platform="${platform}"

npx electron-forge make --arch="arm64" --platform="${platform}"

# rename distributions
if [[ $platform == "win32" ]]; then
version=$(node -p "require('./package.json').version")
mv out/make/squirrel.windows/x64/DocKit-${version}\ Setup.exe out/make/squirrel.windows/x64/DocKit-${version}-x64.Setup.exe
mv out/make/squirrel.windows/arm64/DocKit-${version}\ Setup.exe out/make/squirrel.windows/arm64/DocKit-${version}-arm64.Setup.exe
fi
9 changes: 1 addition & 8 deletions src/electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,9 @@ const createWindow = async () => {
});
createMenu(mainWindow);
// and load the index.html of the app.
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
if (MAIN_WINDOW_VITE_DEV_SERVER_URL) {
for (let i = 0; i < 10; i++) {
try {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const response = await fetch(MAIN_WINDOW_VITE_DEV_SERVER_URL);
if (response.ok) {
break;
Expand All @@ -60,13 +56,10 @@ const createWindow = async () => {

await new Promise(resolve => setTimeout(resolve, 2000));
}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

await mainWindow.loadURL(MAIN_WINDOW_VITE_DEV_SERVER_URL);
} else {
await mainWindow.loadFile(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
path.join(__dirname, `../renderer/${MAIN_WINDOW_VITE_NAME}/index.html`),
);
}
Expand Down

0 comments on commit 42836f9

Please sign in to comment.