diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..20d9c71 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +bin/ +vendor +ssh-benchmark + +--- +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix \ No newline at end of file diff --git a/Taskfile.yaml b/Taskfile.yaml new file mode 100644 index 0000000..1ad5644 --- /dev/null +++ b/Taskfile.yaml @@ -0,0 +1,32 @@ +version: '3' + +vars: + BASE_DIR: + sh: dirname $(pwd) + PROJECT_NAME: + sh: pwd|sed "s#{{.BASE_DIR}}/##g" + GOOS: '' + GOARCH: '' + +tasks: + default: + cmds: + - task: deps + - task: build:binary + silent: true + + deps: + desc: Install all dependencies (except dredd requirements) + cmds: + - task: deps:be + + deps:be: + desc: application dependencies + cmds: + - go mod tidy + + build:binary: + desc: Build a binary for the current architecture + platforms: [amd64] + cmds: + - env CGO_ENABLED=0 GOOS={{ .GOOS }} GOARCH={{ .GOARCH }} go build -o ./bin/{{.PROJECT_NAME}}{{ if eq OS "windows" }}.exe{{ end }} diff --git a/config.json b/config.json index e040295..ca76e6a 100644 --- a/config.json +++ b/config.json @@ -4,5 +4,4 @@ "Username": "root", "Password": "123456", "Geekbench_License": "1934531619@qq.com JDN2X-DHS55-OAYJX-JNR32-BFQXZ-ASDRJ-QYANY-CC7NX-JV3QW" - "Password": "xxxx" -} +} \ No newline at end of file