Skip to content

Commit

Permalink
Merge pull request #2 from wflixu/dev
Browse files Browse the repository at this point in the history
v1.0.6
  • Loading branch information
wflixu authored Jan 20, 2024
2 parents c8847ef + bd26b7a commit 5d35b1f
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 11 deletions.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
# ICamera

视频录像或直播头像
### 主界面
<img src="public/imgs/preview.jpg"/>

### 配置
可以配置大小、边框、形状等参数

<img src="public/imgs/config.jpg"/>



# 技术栈

Tauri + Vue 3 + TypeScript


# 使用

## 下载

[release](https://github.com/wflixu/icamera/releases) 页面下载

<img src="public/imgs/download.jpg"/>



## 本地构建

本地构建

```shell
# 安装依赖
pnpm install
# 构建
pnpm run tb


```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "icamera",
"private": true,
"version": "1.0.4",
"version": "1.0.6",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
Binary file added public/imgs/config.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/imgs/download.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/imgs/env.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/imgs/preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 20 additions & 4 deletions setver.mjs
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
import { writeFile } from 'fs/promises';
import pkg from './package.json' with { type: "json" };
import tconfig from './src-tauri/tauri.conf.json' with {type:'json'}
import tconfig from './src-tauri/tauri.conf.json' with {type: 'json'}

const vs=process.argv[2]
const vs = process.argv[2]
const nextType = process.argv[3] ?? 'patch'
console.log(vs)
pkg.version = vs;

await writeFile('./package.json', JSON.stringify(pkg, null, 2))


tconfig.package.version = vs;
tconfig.tauri.updater.endpoints = [`https://github.com/wflixu/icamera/releases/download/v${vs}/latest.json`]

await writeFile('./src-tauri/tauri.conf.json', JSON.stringify(tconfig, null, 2))
const nv = nextVersion(vs, nextType);

tconfig.tauri.updater.endpoints = [`https://github.com/wflixu/icamera/releases/download/v${nv}/latest.json`]

await writeFile('./src-tauri/tauri.conf.json', JSON.stringify(tconfig, null, 2))

function nextVersion(vs, nt) {
const arr = vs.split('.').map(item => parseInt(item))
if (nt == 'major') {
return `${arr[0] + 1}.0.0`
} else if (nt == 'minor') {
return `${arr[0]}.${arr[1] + 1}.0`
} else {
return `${arr[0]}.${arr[1]}.${arr[2] + 1}`
}

}
21 changes: 21 additions & 0 deletions src-tauri/Cargo.lock

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

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tauri-build = { version = "1.5.0", features = [] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.5.2", features = [ "api-all", "macos-private-api"] }
tauri = { version = "1.5.2", features = [ "updater", "api-all", "macos-private-api"] }

[features]
# this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled.
Expand Down
8 changes: 4 additions & 4 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "icamera",
"version": "1.0.4"
"version": "1.0.6"
},
"tauri": {
"macOSPrivateApi": true,
Expand Down Expand Up @@ -43,7 +43,7 @@
"shortDescription": "",
"targets": [
"dmg",
"app"
"updater"
],
"windows": {
"certificateThumbprint": null,
Expand All @@ -55,9 +55,9 @@
"csp": null
},
"updater": {
"active": false,
"active": true,
"endpoints": [
"https://github.com/wflixu/icamera/releases/download/v1.0.4/latest.json"
"https://github.com/wflixu/icamera/releases/download/v1.0.7/latest.json"
],
"dialog": true,
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQyMEYyMjlBOEFCRjM4RDcKUldUWE9MK0ttaUlQMHFVdmE1cDA5b1l6TmlHTjloWTh4cWw1bGl3WTU1OEg1cmpsam94bCt4RHcK"
Expand Down

0 comments on commit 5d35b1f

Please sign in to comment.