mirror of
https://github.com/lencx/ChatGPT.git
synced 2024-10-01 01:06:13 -04:00
chore: download
This commit is contained in:
parent
a805468a73
commit
423664caa6
@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
[![ChatGPT downloads](https://img.shields.io/github/downloads/lencx/ChatGPT/total.svg?style=flat-square)](https://github.com/lencx/ChatGPT/releases)
|
[![ChatGPT downloads](https://img.shields.io/github/downloads/lencx/ChatGPT/total.svg?style=flat-square)](https://github.com/lencx/ChatGPT/releases)
|
||||||
|
|
||||||
|
<!-- download start -->
|
||||||
|
|
||||||
**Latest:**
|
**Latest:**
|
||||||
|
|
||||||
- `Mac`: [ChatGPT_0.1.6_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.1.6/ChatGPT_0.1.6_x64.dmg)
|
- `Mac`: [ChatGPT_0.1.6_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.1.6/ChatGPT_0.1.6_x64.dmg)
|
||||||
@ -19,6 +21,8 @@
|
|||||||
|
|
||||||
[Other version...](https://github.com/lencx/ChatGPT/releases)
|
[Other version...](https://github.com/lencx/ChatGPT/releases)
|
||||||
|
|
||||||
|
<!-- download end -->
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- multi-platform: `macOS` `Linux` `Windows`
|
- multi-platform: `macOS` `Linux` `Windows`
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
"build": "yarn tauri build",
|
"build": "yarn tauri build",
|
||||||
"updater": "tr updater",
|
"updater": "tr updater",
|
||||||
"release": "tr release --git",
|
"release": "tr release --git",
|
||||||
|
"download": "node ./scripts/download.js",
|
||||||
"tr": "tr",
|
"tr": "tr",
|
||||||
"tauri": "tauri"
|
"tauri": "tauri"
|
||||||
},
|
},
|
||||||
|
30
scripts/download.js
vendored
Normal file
30
scripts/download.js
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
const argv = process.argv.slice(2);
|
||||||
|
|
||||||
|
console.log('«6» /ChatGPT/scripts/download.js ~> ', argv[0]);
|
||||||
|
|
||||||
|
|
||||||
|
function init() {
|
||||||
|
const content = fs.readFileSync('README.md', 'utf8').split('\n');
|
||||||
|
const startRe = /<!-- download start -->/;
|
||||||
|
const endRe = /<!-- download end -->/;
|
||||||
|
|
||||||
|
let flag = false;
|
||||||
|
for (let i = 0; i < content.length; i++) {
|
||||||
|
if (startRe.test(content[i])) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
if (flag) {
|
||||||
|
content[i] = content[i].replace(/(\d+).(\d+).(\d+)/g, argv[0]);
|
||||||
|
}
|
||||||
|
if (endRe.test(content[i])) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.writeFileSync('README.md', content.join('\n'), 'utf8');
|
||||||
|
}
|
||||||
|
|
||||||
|
init();
|
Loading…
Reference in New Issue
Block a user