From 46dc04606ce6b632dd4fc73b226075dc32efee6d Mon Sep 17 00:00:00 2001 From: John Wu <524306184@qq.com> Date: Sun, 12 Apr 2020 15:28:06 +0800 Subject: [PATCH 1/3] fix: stdin trim for windows --- src/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.go b/src/utils.go index 86b1717..5b55123 100644 --- a/src/utils.go +++ b/src/utils.go @@ -67,8 +67,8 @@ func InputString(str *string, hint string) { stdin := bufio.NewReader(os.Stdin) input, err = stdin.ReadString('\n') - input = strings.Trim(input, "\n") - if err != nil || input == ""{ + input = strings.Trim(input, "\r\n") + if err != nil || input == "" { if *str != "" { break } From bb842b906d471551f2fd9dc1d5b21f0b914514a9 Mon Sep 17 00:00:00 2001 From: John Wu <524306184@qq.com> Date: Sun, 12 Apr 2020 15:35:49 +0800 Subject: [PATCH 2/3] ci: static build --- .github/workflows/release.yml | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 718f5f3..10af90f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ jobs: steps: - uses: actions/checkout@master - name: compile and release - uses: wuhan005/cardinal_release_action@v0.0.1 + uses: wuhan005/cardinal_release_action@v0.0.2 env: GITHUB_TOKEN: ${{ secrets.TOKEN }} GOARCH: "386" @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/checkout@master - name: compile and release - uses: wuhan005/cardinal_release_action@v0.0.1 + uses: wuhan005/cardinal_release_action@v0.0.2 env: GITHUB_TOKEN: ${{ secrets.TOKEN }} GOARCH: amd64 @@ -29,7 +29,7 @@ jobs: steps: - uses: actions/checkout@master - name: compile and release - uses: wuhan005/cardinal_release_action@v0.0.1 + uses: wuhan005/cardinal_release_action@v0.0.2 env: GITHUB_TOKEN: ${{ secrets.TOKEN }} GOARCH: arm @@ -40,7 +40,7 @@ jobs: steps: - uses: actions/checkout@master - name: compile and release - uses: wuhan005/cardinal_release_action@v0.0.1 + uses: wuhan005/cardinal_release_action@v0.0.2 env: GITHUB_TOKEN: ${{ secrets.TOKEN }} GOARCH: arm64 @@ -51,7 +51,7 @@ jobs: steps: - uses: actions/checkout@master - name: compile and release - uses: wuhan005/cardinal_release_action@v0.0.1 + uses: wuhan005/cardinal_release_action@v0.0.2 env: GITHUB_TOKEN: ${{ secrets.TOKEN }} GOARCH: "386" @@ -62,7 +62,7 @@ jobs: steps: - uses: actions/checkout@master - name: compile and release - uses: wuhan005/cardinal_release_action@v0.0.1 + uses: wuhan005/cardinal_release_action@v0.0.2 env: GITHUB_TOKEN: ${{ secrets.TOKEN }} GOARCH: amd64 @@ -73,7 +73,7 @@ jobs: steps: - uses: actions/checkout@master - name: compile and release - uses: wuhan005/cardinal_release_action@v0.0.1 + uses: wuhan005/cardinal_release_action@v0.0.2 env: GITHUB_TOKEN: ${{ secrets.TOKEN }} GOARCH: "386" @@ -84,19 +84,8 @@ jobs: steps: - uses: actions/checkout@master - name: compile and release - uses: wuhan005/cardinal_release_action@v0.0.1 + uses: wuhan005/cardinal_release_action@v0.0.2 env: GITHUB_TOKEN: ${{ secrets.TOKEN }} GOARCH: amd64 - GOOS: windows - release-windows-arm: - name: release windows/arm - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: compile and release - uses: wuhan005/cardinal_release_action@v0.0.1 - env: - GITHUB_TOKEN: ${{ secrets.TOKEN }} - GOARCH: arm GOOS: windows \ No newline at end of file From 286e15dcfdbf22bed107d5bb9a1d0cc96ff70ee4 Mon Sep 17 00:00:00 2001 From: John Wu <524306184@qq.com> Date: Sun, 12 Apr 2020 15:44:49 +0800 Subject: [PATCH 3/3] docs: image --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c78587f..8f88f5d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Cardinal 是由 Vidar-Team 开发的 AWD 比赛平台,使用 Go 编写。本 ![Cardinal Frontend](https://img.cdn.n3ko.co/lsky/2020/03/03/7b6161f88fb94.png) -![Cardinal Backend](https://img.cdn.n3ko.co/lsky/2020/03/03/a7ccd8a8fbd43.png) +![Cardinal Backend](https://img.cdn.n3ko.co/lsky/2020/03/03/a7ccd8a8fbd43.png#) ## 功能介绍 * 管理员创建题目、分配题目靶机、参赛队伍、生成 Flag、发布公告