animeic-cd 1 year ago
parent
commit
bcae34fb70
1 changed files with 10 additions and 0 deletions
  1. 10 0
      main.go

+ 10 - 0
main.go

@@ -37,6 +37,16 @@ func main() {
 			fmt.Println(err)
 			return
 		}
+		// 替换版本
+		err = utils.WriteConfig(&utils.Config{
+			Version: version.Version,
+			Url:     config.Url,
+			ExePath: config.ExePath,
+		})
+		if err != nil {
+			fmt.Println(err)
+			fmt.Println("配置写入失败")
+		}
 	}
 	// 运行应用程序
 	cmd := exec.Command(config.ExePath)