From e2dd6be756dbf36bd0d72873c5601cced39f203b Mon Sep 17 00:00:00 2001 From: yisier <1340976576@qq.com> Date: Fri, 24 Feb 2023 17:52:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=A8=8B=E5=BA=8F=20url=20?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=88=B0=E5=BD=93=E5=89=8D=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 18 ++++++++++-------- lib/install/install.go | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9105b6fe..1e66ad6c 100644 --- a/README.md +++ b/README.md @@ -15,16 +15,18 @@ ## 更新日志 - 2023-02-24 v0.26.15 + ***修复***:更新程序 url 更改到当前仓库中 ***修复***:nps 在外部路径启动时找不到配置文件 ***新增***:增加 nps 启动参数,`-conf_path=D:\test\nps`,可用于加载指定nps配置文件和web文件目录。 - window 使用示例: -- 启动:`nps.exe -conf_path=D:\test\nps` -- 安装:`nps.exe install -conf_path=D:\test\nps` - - 安装启动:`nps start` - linux 使用示例: -- 直接启动:`./nps -conf_path=/app/nps` -- 安装:`./nps install -conf_path=/app/nps` -- 安装启动:`nps start -conf_path=/app/nps` + ***window 使用示例:*** + 启动:`nps.exe -conf_path=D:\test\nps` + 安装:`nps.exe install -conf_path=D:\test\nps` + 安装启动:`nps start` + + ***linux 使用示例:*** + 直接启动:`./nps -conf_path=/app/nps` + 安装:`./nps install -conf_path=/app/nps` + 安装启动:`nps start -conf_path=/app/nps` diff --git a/lib/install/install.go b/lib/install/install.go index d697912d..4d970ac9 100644 --- a/lib/install/install.go +++ b/lib/install/install.go @@ -154,7 +154,7 @@ type release struct { func downloadLatest(bin string) string { // get version - data, err := http.Get("https://api.github.com/repos/ehang-io/nps/releases/latest") + data, err := http.Get("https://api.github.com/repos/yisier/nps/releases/latest") if err != nil { log.Fatal(err.Error()) } @@ -168,7 +168,7 @@ func downloadLatest(bin string) string { fmt.Println("the latest version is", version) filename := runtime.GOOS + "_" + runtime.GOARCH + "_" + bin + ".tar.gz" // download latest package - downloadUrl := fmt.Sprintf("https://ehang.io/nps/releases/download/%s/%s", version, filename) + downloadUrl := fmt.Sprintf("https://github.com/yisier/nps/releases/download/%s/%s", version, filename) fmt.Println("download package from ", downloadUrl) resp, err := http.Get(downloadUrl) if err != nil {