Skip to content

Commit

Permalink
1.1.72
Browse files Browse the repository at this point in the history
  • Loading branch information
YouROK committed Sep 21, 2019
1 parent a27280a commit 8933a86
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 19 deletions.
38 changes: 19 additions & 19 deletions release.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
3 changes: 3 additions & 0 deletions src/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ func (args) Version() string {
var params args

func main() {
//mkReleasesJS()
//return

arg.MustParse(&params)

if params.Path == "" {
Expand Down
69 changes: 69 additions & 0 deletions src/main/test.go
Original file line number Diff line number Diff line change
@@ -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()

Expand Down

0 comments on commit 8933a86

Please sign in to comment.