From 9fd49fca3ea7ab9ed9a9cfd7d5026ddf8be6ee6b Mon Sep 17 00:00:00 2001 From: Carson Reinke Date: Sat, 18 Mar 2023 12:59:44 -0400 Subject: [PATCH 1/4] Workflow needs to include linux build in zip file --- .github/workflows/go.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 140c623..bd5edcb 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -28,12 +28,12 @@ jobs: run: | GOOS=windows go build -ldflags "-s -w" GOOS=darwin go build -o gitmoo-goog-osx -ldflags "-s -w" - go build -ldflags "-s -w" + go build -ldflags "-s -w" -o gitmoo-goog cd installer go build ./installer cd .. - zip gitmoo-goog.zip installer/*.deb gitmoo-goog-osx gitmoo-goog.exe + zip gitmoo-goog.zip installer/*.deb gitmoo-goog gitmoo-goog-osx gitmoo-goog.exe - name: Create Release id: create_release From f6b6986684fb0b344eb1367c1da0fc464b85a40f Mon Sep 17 00:00:00 2001 From: Carson Reinke Date: Sat, 18 Mar 2023 13:08:37 -0400 Subject: [PATCH 2/4] Update action versions --- .github/workflows/go.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index bd5edcb..e30fd35 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -13,10 +13,10 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: 1.15 From be101f759e64197f5cf76084758c28c32b4a1bd1 Mon Sep 17 00:00:00 2001 From: Carson Reinke Date: Sat, 18 Mar 2023 13:14:47 -0400 Subject: [PATCH 3/4] Fix test build --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e30fd35..8cbb7ca 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -21,7 +21,7 @@ jobs: go-version: 1.15 - name: Test - run: go test -v ./... + run: go test -v ./downloader # There is only a test in this folder - name: Build if: success() From dc93d003eb54fd16909dba5526259dbff3b09bf7 Mon Sep 17 00:00:00 2001 From: Carson Reinke Date: Sat, 18 Mar 2023 13:37:49 -0400 Subject: [PATCH 4/4] Fix test --- downloader/downloader_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/downloader/downloader_test.go b/downloader/downloader_test.go index 6e0b5e0..ed6627b 100644 --- a/downloader/downloader_test.go +++ b/downloader/downloader_test.go @@ -3,6 +3,7 @@ package downloader import ( "encoding/json" "io/ioutil" + "mime" "os" "path/filepath" "testing" @@ -124,7 +125,9 @@ func TestCreateFileName(t *testing.T) { item.MediaMetadata.CreationTime = "2019-10-13T17:33:43Z" have := downloader.createFileName(item, 0) - want := "13_34567890.jpe" + // Extensions can vary by system and will just defer to that for the correct extension + ext, _ := mime.ExtensionsByType(item.MimeType) + want := "13_34567890" + ext[0] if have != want { t.Errorf("downloader.createFileName() = %v; want %v", have, want)