From 1e41aabe7de319fd84e65d1c16065266971d7a8b Mon Sep 17 00:00:00 2001 From: Andy Wang Date: Sat, 19 Dec 2020 20:37:42 +0000 Subject: [PATCH 1/4] Alter glob in release action --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 316ea63..39d8cf1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,7 @@ jobs: - name: Release uses: softprops/action-gh-release@v1 with: - files: release/* + fail_on_unmatched_files: true + files: release/*.* env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 0473d71bea4c7896e50a8e48bf679ff7d5d9b04e Mon Sep 17 00:00:00 2001 From: Andy Wang Date: Sat, 19 Dec 2020 20:49:21 +0000 Subject: [PATCH 2/4] Fix overflow in padding length calculation --- internal/multiplex/session.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/multiplex/session.go b/internal/multiplex/session.go index e1ab275..c808e2b 100644 --- a/internal/multiplex/session.go +++ b/internal/multiplex/session.go @@ -291,7 +291,7 @@ func (sesh *Session) passiveClose() error { func genRandomPadding() []byte { lenB := make([]byte, 1) common.CryptoRandRead(lenB) - pad := make([]byte, lenB[0]+1) + pad := make([]byte, int(lenB[0])+1) common.CryptoRandRead(pad) return pad } From 3f941ee4e1a3cf0dfcc7fb43b13fe8fe4671f886 Mon Sep 17 00:00:00 2001 From: Andy Wang Date: Sat, 19 Dec 2020 20:54:08 +0000 Subject: [PATCH 3/4] Edit release action glob --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 39d8cf1..6aaa77e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,6 @@ jobs: - name: Release uses: softprops/action-gh-release@v1 with: - fail_on_unmatched_files: true - files: release/*.* + files: ./release/ck-* env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 189c69ec25ae9ca5bbfe560326fc037ea7979bc5 Mon Sep 17 00:00:00 2001 From: Andy Wang Date: Sat, 19 Dec 2020 21:04:33 +0000 Subject: [PATCH 4/4] popd after compilation script finishes --- release.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/release.sh b/release.sh index 8b271cf..277f87a 100755 --- a/release.sh +++ b/release.sh @@ -21,9 +21,11 @@ CGO_ENABLED=0 gox -ldflags "-X main.version=${v}" -os="$os" -arch="$arch" -osarc CGO_ENABLED=0 GOOS="linux" GOARCH="mips" GOMIPS="softfloat" go build -ldflags "-X main.version=${v}" -o ck-client-linux-mips_softfloat-"${v}" CGO_ENABLED=0 GOOS="linux" GOARCH="mipsle" GOMIPS="softfloat" go build -ldflags "-X main.version=${v}" -o ck-client-linux-mipsle_softfloat-"${v}" mv ck-client-* ../../release +popd os="linux" arch="amd64 386 arm arm64" -pushd ../ck-server || exit 1 +pushd cmd/ck-server || exit 1 CGO_ENABLED=0 gox -ldflags "-X main.version=${v}" -os="$os" -arch="$arch" -osarch="$osarch" -output="$output" mv ck-server-* ../../release +popd \ No newline at end of file