From a9f0f3cbbc1c5a8a9244f6ddc1cd383e84e7dab1 Mon Sep 17 00:00:00 2001 From: matu6968 Date: Sun, 29 Sep 2024 12:58:52 +0200 Subject: [PATCH 1/6] fix Mac OS target --- .gitea/workflows/build.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 7f515a6..6d6e585 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -50,13 +50,13 @@ jobs: if: env.main_go_modified == 'true' run: | go mod tidy - GOOS=darwin GOARCH=386 go build -o s3-client_linux.x86 + GOOS=darwin GOARCH=386 go build -o s3-client_darwin.x86_64.app - name: Build Go binary for Mac OS (ARM64) if: env.main_go_modified == 'true' run: | go mod tidy - GOOS=darwin GOARCH=arm64 go build -o s3-client_linux.arm64 + GOOS=darwin GOARCH=arm64 go build -o s3-client_darwin.arm64.app - name: Build Go binary for Linux (ARMv7) if: env.main_go_modified == 'true' @@ -151,6 +151,8 @@ jobs: ./s3-client_windows.x86_64.exe ./s3-client_windows.x86.exe ./s3-client_windows.arm64.exe + ./s3-client_darwin.x86_64.app + ./s3-client_darwin.arm64.app tag_name: ${{ env.new_version }} name: Release ${{ env.new_version }} From 431787d06105a2a833a319979469742404015370 Mon Sep 17 00:00:00 2001 From: leafus Date: Sun, 29 Sep 2024 12:59:14 +0200 Subject: [PATCH 2/6] Update main.go --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 64047f1..cdd10a5 100644 --- a/main.go +++ b/main.go @@ -43,7 +43,7 @@ func main() { } if *configPath == "" { - fmt.Println("No config file found. Please specify a config file using --config or create one in the default locations.") + fmt.Println("No config file found. Please specify a config file using -config or create one in the default locations.") os.Exit(1) } } From 5c518abcdc3065175940fb50da2cfba518a5ab8c Mon Sep 17 00:00:00 2001 From: leafus Date: Sun, 29 Sep 2024 13:00:21 +0200 Subject: [PATCH 3/6] Update .gitea/workflows/build.yaml --- .gitea/workflows/build.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 6d6e585..48f6053 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -18,16 +18,6 @@ jobs: with: go-version: '1.23.1' - - name: Check if main.go was modified - id: check_main_go - run: | - git fetch origin main - if git diff --name-only HEAD origin/main | grep -q 'main.go'; then - echo "main_go_modified=true" >> $GITHUB_ENV - else - echo "main_go_modified=false" >> $GITHUB_ENV - fi - - name: Build Go binary for Linux if: env.main_go_modified == 'true' run: | From 20c9b455617f23b897bb56c2d6475f8f92891d78 Mon Sep 17 00:00:00 2001 From: matu6968 Date: Sun, 29 Sep 2024 13:00:48 +0200 Subject: [PATCH 4/6] Update .gitea/workflows/build.yaml --- .gitea/workflows/build.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 48f6053..626b8d4 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -18,6 +18,16 @@ jobs: with: go-version: '1.23.1' + - name: Check if main.go was modified + id: check_main_go + run: | + git fetch origin main + if git diff --name-only HEAD origin/main | grep -q 'main.go'; then + echo "main_go_modified=true" >> $GITHUB_ENV + else + echo "main_go_modified=false" >> $GITHUB_ENV + fi + - name: Build Go binary for Linux if: env.main_go_modified == 'true' run: | @@ -40,7 +50,7 @@ jobs: if: env.main_go_modified == 'true' run: | go mod tidy - GOOS=darwin GOARCH=386 go build -o s3-client_darwin.x86_64.app + GOOS=darwin GOARCH=amd64 go build -o s3-client_darwin.x86_64.app - name: Build Go binary for Mac OS (ARM64) if: env.main_go_modified == 'true' From 915245e9da5af87b4fd72e7aa12aaa6de0ecb723 Mon Sep 17 00:00:00 2001 From: matu6968 Date: Sun, 29 Sep 2024 13:01:03 +0200 Subject: [PATCH 5/6] Update .gitea/workflows/build.yaml --- .gitea/workflows/build.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 626b8d4..0469879 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -18,16 +18,6 @@ jobs: with: go-version: '1.23.1' - - name: Check if main.go was modified - id: check_main_go - run: | - git fetch origin main - if git diff --name-only HEAD origin/main | grep -q 'main.go'; then - echo "main_go_modified=true" >> $GITHUB_ENV - else - echo "main_go_modified=false" >> $GITHUB_ENV - fi - - name: Build Go binary for Linux if: env.main_go_modified == 'true' run: | From 8bde3ccb909aa8da761aa96cc3ac79504b6164b3 Mon Sep 17 00:00:00 2001 From: leafus Date: Sun, 29 Sep 2024 13:02:55 +0200 Subject: [PATCH 6/6] Update .gitea/workflows/build.yaml --- .gitea/workflows/build.yaml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 0469879..d36c119 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -19,60 +19,50 @@ jobs: go-version: '1.23.1' - name: Build Go binary for Linux - if: env.main_go_modified == 'true' run: | go mod tidy go build -o s3-client_linux.x86_64 - name: Build Go binary for Linux (x86) - if: env.main_go_modified == 'true' run: | go mod tidy GOARCH=386 go build -o s3-client_linux.x86 - name: Build Go binary for Linux (ARM64) - if: env.main_go_modified == 'true' run: | go mod tidy GOARCH=arm64 go build -o s3-client_linux.arm64 - name: Build Go binary for Mac OS (x86_64) - if: env.main_go_modified == 'true' run: | go mod tidy GOOS=darwin GOARCH=amd64 go build -o s3-client_darwin.x86_64.app - name: Build Go binary for Mac OS (ARM64) - if: env.main_go_modified == 'true' run: | go mod tidy GOOS=darwin GOARCH=arm64 go build -o s3-client_darwin.arm64.app - name: Build Go binary for Linux (ARMv7) - if: env.main_go_modified == 'true' run: | go mod tidy GOARCH=arm go build -o s3-client_linux.armv7 - name: Build Go binary for Linux (RISC-V) - if: env.main_go_modified == 'true' run: | go mod tidy GOARCH=riscv64 go build -o s3-client_linux.riscv64 - name: Build Go binary for Windows - if: env.main_go_modified == 'true' run: | GOOS=windows GOARCH=amd64 go build -o s3-client_windows.x86_64.exe - name: Build Go binary for Windows (x86) - if: env.main_go_modified == 'true' run: | go mod tidy GOOS=windows GOARCH=386 go build -o s3-client_windows.x86.exe - name: Build Go binary for Windows (ARM64) - if: env.main_go_modified == 'true' run: | go mod tidy GOOS=windows GOARCH=arm64 go build -o s3-client_windows.arm64.exe @@ -113,7 +103,6 @@ jobs: - name: Create Release id: create_release - if: env.main_go_modified == 'true' uses: actions/create-release@v1 with: tag_name: ${{ env.new_version }} @@ -129,7 +118,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.TOKEN }} - name: Upload Go binaries to release - if: env.main_go_modified == 'true' uses: softprops/action-gh-release@v1 with: files: |