From 8933a860a0b32f9f123a3ac43f6fa8663e48e5c1 Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Sat, 21 Sep 2019 10:23:52 +0300 Subject: [PATCH] 1.1.72 --- release.json | 38 +++++++++++++------------- src/main/main.go | 3 +++ src/main/test.go | 69 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 19 deletions(-) diff --git a/release.json b/release.json index 3673f527..b25242b7 100644 --- a/release.json +++ b/release.json @@ -1,24 +1,24 @@ { "Name": "TorrServer", - "Version": "1.1.71", - "BuildDate": "17.05.2019", + "Version": "1.1.72", + "BuildDate": "21.09.2019", "Links": { - "android-386": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-android-386", - "android-amd64": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-android-amd64", - "android-arm64": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-android-arm64", - "android-arm7": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-android-arm7", - "darwin-amd64": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-darwin-amd64", - "linux-386": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-386", - "linux-amd64": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-amd64", - "linux-arm5": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-arm5", - "linux-arm6": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-arm6", - "linux-arm64": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-arm64", - "linux-arm7": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-arm7", - "linux-mips": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-mips", - "linux-mips64": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-mips64", - "linux-mips64le": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-mips64le", - "linux-mipsle": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-mipsle", - "windows-386.exe": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-windows-386.exe", - "windows-amd64.exe": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-windows-amd64.exe" + "android-386": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-android-386", + "android-amd64": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-android-amd64", + "android-arm64": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-android-arm64", + "android-arm7": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-android-arm7", + "darwin-amd64": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-darwin-amd64", + "linux-386": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-linux-386", + "linux-amd64": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-linux-amd64", + "linux-arm5": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-linux-arm5", + "linux-arm6": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-linux-arm6", + "linux-arm64": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-linux-arm64", + "linux-arm7": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-linux-arm7", + "linux-mips": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-linux-mips", + "linux-mips64": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-linux-mips64", + "linux-mips64le": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-linux-mips64le", + "linux-mipsle": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-linux-mipsle", + "windows-386.exe": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-windows-386.exe", + "windows-amd64.exe": "https://github.com/YouROK/TorrServer/releases/download/1.1.72/TorrServer-windows-amd64.exe" } } \ No newline at end of file diff --git a/src/main/main.go b/src/main/main.go index 9b3a9ef7..7af70a43 100644 --- a/src/main/main.go +++ b/src/main/main.go @@ -28,6 +28,9 @@ func (args) Version() string { var params args func main() { + //mkReleasesJS() + //return + arg.MustParse(¶ms) if params.Path == "" { diff --git a/src/main/test.go b/src/main/test.go index 96f84d80..7702af44 100644 --- a/src/main/test.go +++ b/src/main/test.go @@ -1,17 +1,86 @@ package main import ( + "encoding/json" "fmt" + "io/ioutil" "log" "os" "sync" "time" "server/utils" + "server/version" "github.com/anacrolix/torrent" ) +/* +{ + "Name": "TorrServer", + "Version": "1.1.71", + "BuildDate": "17.05.2019", + "Links": { + "android-386": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-android-386", + "android-amd64": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-android-amd64", + "android-arm64": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-android-arm64", + "android-arm7": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-android-arm7", + "darwin-amd64": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-darwin-amd64", + "linux-386": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-386", + "linux-amd64": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-amd64", + "linux-arm5": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-arm5", + "linux-arm6": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-arm6", + "linux-arm64": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-arm64", + "linux-arm7": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-arm7", + "linux-mips": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-mips", + "linux-mips64": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-mips64", + "linux-mips64le": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-mips64le", + "linux-mipsle": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-linux-mipsle", + "windows-386.exe": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-windows-386.exe", + "windows-amd64.exe": "https://github.com/YouROK/TorrServer/releases/download/1.1.71/TorrServer-windows-amd64.exe" + } +} +*/ + +type release struct { + Version string + Links map[string]string +} + +func mkReleasesJS() { + var releases []release + for i := 65; i <= version.VerInt; i++ { + links := map[string]string{ + "android-386": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-android-386", i), + "android-amd64": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-android-amd64", i), + "android-arm64": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-android-arm64", i), + "android-arm7": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-android-arm7", i), + "darwin-amd64": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-darwin-amd64", i), + "linux-386": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-linux-386", i), + "linux-amd64": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-linux-amd64", i), + "linux-arm5": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-linux-arm5", i), + "linux-arm6": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-linux-arm6", i), + "linux-arm64": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-linux-arm64", i), + "linux-arm7": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-linux-arm7", i), + "linux-mips": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-linux-mips", i), + "linux-mips64": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-linux-mips64", i), + "linux-mips64le": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-linux-mips64le", i), + "linux-mipsle": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-linux-mipsle", i), + "windows-386.exe": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-windows-386.exe", i), + "windows-amd64.exe": fmt.Sprintf("https://github.com/YouROK/TorrServer/releases/download/1.1.%d/TorrServer-windows-amd64.exe", i), + } + rel := release{ + Version: fmt.Sprintf("1.1.%d", i), + Links: links, + } + releases = append(releases, rel) + } + buf, _ := json.MarshalIndent(releases, "", " ") + if len(buf) > 0 { + ioutil.WriteFile("/home/yourok/surge/torrserve/releases.json", buf, 0666) + } +} + func test() { config := torrent.NewDefaultClientConfig()