Skip to content

Commit

Permalink
更新程序 url 更改到当前仓库中
Browse files Browse the repository at this point in the history
  • Loading branch information
yisier committed Feb 24, 2023
1 parent 834f929 commit e2dd6be
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`



Expand Down
4 changes: 2 additions & 2 deletions lib/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand All @@ -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 {
Expand Down

0 comments on commit e2dd6be

Please sign in to comment.