Skip to content

Commit

Permalink
chore: Update .gitignore to ignore key files
Browse files Browse the repository at this point in the history
  • Loading branch information
XPH0816 committed Jun 20, 2024
1 parent 37a3f85 commit 6ee9766
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ dist-ssr
build
*.local

# Keys
*.pem

# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand Down
5 changes: 3 additions & 2 deletions setup-key.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@echo off
ssh-keygen -t rsa -b 4096 -m PEM -f ./src-tauri/src/private.pem
openssl rsa -in ./src-tauri/src/private.pem -pubout -outform PEM -out ./src-tauri/src/public.pem
ssh-keygen -t rsa -b 4096 -m PEM -f ./src-tauri/src/private.pem -N ""
openssl rsa -in ./src-tauri/src/private.pem -pubout -outform PEM -out ./src-tauri/src/public.pem
rm ./src-tauri/src/private.pem.pub
3 changes: 3 additions & 0 deletions setup-key.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ssh-keygen -t rsa -b 4096 -m PEM -f ./src-tauri/src/private.pem -N ""
openssl rsa -in ./src-tauri/src/private.pem -pubout -outform PEM -out ./src-tauri/src/public.pem
rm ./src-tauri/src/private.pem.pub
4 changes: 4 additions & 0 deletions src-tauri/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
# Generated by Tauri
# will have schema files for capabilities auto-completion
/gen/schemas

# Key files
/src/*.pem
/src/*.pem.pub
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"build": {
"beforeDevCommand": "pnpm dev",
"beforeBuildCommand": "pnpm build",
"beforeBuildCommand": "pnpm build && setup-key",
"devPath": "http://localhost:1420",
"distDir": "../build"
},
Expand Down

0 comments on commit 6ee9766

Please sign in to comment.