Compare commits

..

15 Commits

Author SHA1 Message Date
64d4861bc7 update README.md 2020-02-01 17:25:49 +08:00
7f3996f15b Merge branch 'master' of git.hxr.so:yige/electron-distribution into dev 2020-02-01 17:24:11 +08:00
43ec6cbcdf update README.md 2020-02-01 17:23:28 +08:00
571cf1bf5e Merge branch 'master' of git.hxr.so:yige/electron-distribution into dev 2020-02-01 17:12:19 +08:00
fa0bc88221 merge 2020-02-01 17:11:42 +08:00
00fcee6ac8 Merge branch 'master' of git.hxr.so:yige/electron-distribution into dev 2020-02-01 15:25:43 +08:00
30152feb79 Merge branch 'master' of git.hxr.so:yige/electron-distribution into dev 2020-02-01 15:25:03 +08:00
db2854f569 release 1.0.4 2020-02-01 15:24:45 +08:00
934df30846 Merge branch 'master' of git.hxr.so:yige/electron-distribution 2020-02-01 15:24:09 +08:00
6968483acc upgrade npm package 2020-01-15 17:58:01 +08:00
74105a1a4f preview 2019-10-03 23:47:22 +08:00
9e80051475 pull source 2019-10-03 23:43:43 +08:00
99db40f356 update version 2019-09-24 17:11:12 +08:00
9295b165f7 for certum 2019-09-10 22:51:56 +08:00
7077517fe0 fix pull type 2019-07-06 18:01:11 +08:00
7 changed files with 1557 additions and 1277 deletions

2
.gitignore vendored
View File

@ -13,3 +13,5 @@ npm-debug.log
.Trashes .Trashes
yarn-error.log yarn-error.log
.vscode

View File

@ -11,7 +11,9 @@ Electron build and auto update service, application distribution. Making applica
A git repository corresponds to an electron app and an distributed system. A git repository corresponds to an electron app and an distributed system.
Electron Distribution server-side work in 64 bit Linux OS (required) and MacOS (optional), and build for x64 platfrom, other platfrom need to modify the code (It is easy). Electron Distribution server-side work in 64 bit Linux OS (required) and MacOS (optional), and build for x64 platform, other platform need to modify the code (It is easy).
![Electron Distribution](/preview.png)
## Quick Setup Guide ## Quick Setup Guide
@ -37,14 +39,18 @@ docker run -itd --name electron-distribution --restart always \
wy373226722/electron-distribution:latest wy373226722/electron-distribution:latest
``` ```
China user: `docker pull registry.cn-shenzhen.aliyuncs.com/yi-ge/electron-distribution:latest` or `docker pull ccr.ccs.tencentyun.com/yi-ge/electron-distribution:latest` **China user**
Aliyun: `docker pull registry.cn-shenzhen.aliyuncs.com/yi-ge/electron-distribution:latest`
TencentYun: `docker pull ccr.ccs.tencentyun.com/yi-ge/electron-distribution:latest`
**Notice**
You need to configure nginx and SSL by yourself. SCHEME only a tip. You need to configure nginx and SSL by yourself. SCHEME only a tip.
#### Environment #### Environment
| ENV Var | Default | Description | | ENV Var | Default | Description |
|---|---|---| | ----------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `NAME` | `"APP"` | `Your app name. Numbers, letters and "-".` | | `NAME` | `"APP"` | `Your app name. Numbers, letters and "-".` |
| `SCHEME` | `"https"` | `Production environment only work with SSL.` | | `SCHEME` | `"https"` | `Production environment only work with SSL.` |
| `DOMAIN` | `"www.example.com"` | `Your Electron Distribution server-side domain.` | | `DOMAIN` | `"www.example.com"` | `Your Electron Distribution server-side domain.` |
@ -174,3 +180,7 @@ Run the `ssh macName@macIp` in the linux server at least once .
Run the `ssh linux@linuxIp` in the mac server at least once. Run the `ssh linux@linuxIp` in the mac server at least once.
Install `rsync` and enable sshd in your Linux Server. Install `rsync` and enable sshd in your Linux Server.
## Author
Yi Wang a@wyr.me

View File

@ -37,14 +37,18 @@ docker run -itd --name electron-distribution --restart always \
wy373226722/electron-distribution wy373226722/electron-distribution
``` ```
国内用户: `docker pull registry.cn-shenzhen.aliyuncs.com/yi-ge/electron-distribution:latest` or `docker pull ccr.ccs.tencentyun.com/yi-ge/electron-distribution:latest` **国内用户**
阿里云镜像:`docker pull registry.cn-shenzhen.aliyuncs.com/yi-ge/electron-distribution:latest`
腾讯云镜像:`docker pull ccr.ccs.tencentyun.com/yi-ge/electron-distribution:latest`
**注意**
你需要自行安装 Nginx 并配置使其支持 SSL这是必须的否则应用程序自动更新可能会失效。`SCHEME`只是一个标识。 你需要自行安装 Nginx 并配置使其支持 SSL这是必须的否则应用程序自动更新可能会失效。`SCHEME`只是一个标识。
#### 环境变量 #### 环境变量
| 变量名 | 默认值 | 描述 | | 变量名 | 默认值 | 描述 |
|---|---|---| | ----------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `NAME` | `"APP"` | `Your app name. Numbers, letters and "-".` | | `NAME` | `"APP"` | `Your app name. Numbers, letters and "-".` |
| `SCHEME` | `"https"` | `Production environment only work with SSL.` | | `SCHEME` | `"https"` | `Production environment only work with SSL.` |
| `DOMAIN` | `"www.example.com"` | `Your Electron Distribution server-side domain.` | | `DOMAIN` | `"www.example.com"` | `Your Electron Distribution server-side domain.` |

View File

@ -1,6 +1,6 @@
{ {
"name": "electron-distribution", "name": "electron-distribution",
"version": "1.0.3", "version": "1.0.4",
"description": "Electron Distribution", "description": "Electron Distribution",
"author": "yi-ge <a@wyr.me>", "author": "yi-ge <a@wyr.me>",
"scripts": { "scripts": {
@ -10,35 +10,35 @@
}, },
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"ali-oss": "^6.1.1", "ali-oss": "^6.4.0",
"axios": "^0.18.0", "axios": "^0.19.1",
"chalk": "^2.4.2", "chalk": "^3.0.0",
"chance": "^1.0.18", "chance": "^1.1.4",
"cos-nodejs-sdk-v5": "^2.5.7", "cos-nodejs-sdk-v5": "^2.5.14",
"dockerode": "^2.5.8", "dockerode": "^3.0.2",
"hapi": "^18.1.0", "hapi": "^18.1.0",
"hapi-swagger": "^9.4.2", "hapi-swagger": "^12.0.0",
"inert": "^5.1.2", "inert": "^5.1.3",
"joi": "^13.7.0", "joi": "^14.3.1",
"jssha": "^2.3.1", "jssha": "^2.3.1",
"lodash": "^4.17.11", "lodash": "^4.17.15",
"lowdb": "^1.0.0", "lowdb": "^1.0.0",
"moment-timezone": "^0.5.23", "moment-timezone": "^0.5.27",
"qiniu": "^7.2.1", "qiniu": "^7.3.0",
"simple-git": "^1.110.0", "simple-git": "^1.129.0",
"socket.io": "^2.2.0", "socket.io": "^2.3.0",
"ssh2": "^0.8.2", "ssh2": "^0.8.7",
"vision": "^5.4.4" "vision": "^5.4.4"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.2.3", "@babel/cli": "^7.8.3",
"@babel/core": "^7.4.0", "@babel/core": "^7.8.3",
"@babel/plugin-proposal-class-properties": "^7.4.0", "@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-decorators": "^7.4.0", "@babel/plugin-proposal-decorators": "^7.8.3",
"@babel/plugin-proposal-optional-chaining": "^7.2.0", "@babel/plugin-proposal-optional-chaining": "^7.8.3",
"@babel/preset-env": "^7.4.2", "@babel/preset-env": "^7.8.3",
"@babel/register": "^7.4.0", "@babel/register": "^7.8.3",
"nodemon": "^1.18.10" "nodemon": "^2.0.2"
}, },
"nodemonConfig": { "nodemonConfig": {
"ignore": [ "ignore": [

BIN
preview.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 KiB

View File

@ -65,7 +65,7 @@ const gitCodeUpdate = async (buidType) => {
} else { } else {
resolve({ resolve({
code: 1, code: 1,
type: 'clone', type: 'pull',
change: false change: false
}) })
} }
@ -75,7 +75,8 @@ const gitCodeUpdate = async (buidType) => {
const promiseList = [] const promiseList = []
if (buidType.includes('mac')) { // 无论是否包含mac都应该更新参照代码
// if (buidType.includes('mac')) {
if (!fs.existsSync(sourcePath)) { if (!fs.existsSync(sourcePath)) {
mkdirsSync(sourcePath) mkdirsSync(sourcePath)
promiseList.push(gitClone(repoPath, sourcePath, 'Source')) promiseList.push(gitClone(repoPath, sourcePath, 'Source'))
@ -86,7 +87,7 @@ const gitCodeUpdate = async (buidType) => {
promiseList.push(gitClone(repoPath, sourcePath, 'Source')) promiseList.push(gitClone(repoPath, sourcePath, 'Source'))
} }
} }
} // }
if (buidType.includes('linux')) { if (buidType.includes('linux')) {
if (!fs.existsSync(linuxPath)) { if (!fs.existsSync(linuxPath)) {

2567
yarn.lock

File diff suppressed because it is too large Load Diff