chore: rename artifacts

This commit is contained in:
DaanSelen
2026-03-30 13:37:18 +02:00
parent 1ae2620e7e
commit d5844bf28a
2 changed files with 27 additions and 9 deletions
+4 -4
View File
@@ -53,7 +53,7 @@ jobs:
- name: Upload binaries as artifacts - name: Upload binaries as artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: linux-bin name: bin-linux
path: /dist path: /dist
prepare-windows: prepare-windows:
@@ -120,7 +120,7 @@ jobs:
- name: Upload binaries as artifacts - name: Upload binaries as artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: windows-bin name: bin-windows
path: /dist path: /dist
compile-linux: compile-linux:
@@ -135,7 +135,7 @@ jobs:
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: linux-bin name: bin-linux
path: ./bin path: ./bin
- name: Setup the Go programming language - name: Setup the Go programming language
@@ -188,7 +188,7 @@ jobs:
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: windows-bin name: bin-windows
path: ./bin path: ./bin
- name: Setup the Go programming language - name: Setup the Go programming language
+23 -5
View File
@@ -1,14 +1,32 @@
package setup package setup
import "os" import (
"log"
"os"
)
func PrepareEnvironment() (bool, error) { func PrepareEnvironment() (bool, error) {
if _, err := os.Stat("./bin"); err != nil { ok, err := fsCheck()
return false, err
return ok, err
}
func fsCheck() (bool, error) {
dirs := []string{"./bin", "./books", "./history"}
files := []string{"./api.conf", "./os_categories.json"}
for _, d := range dirs {
if _, err := os.Stat(d); err != nil {
log.Printf("Unable to stat dir: %s", d)
return false, err
}
} }
if _, err := os.Stat("./books"); err != nil { for _, f := range files {
return false, err if _, err := os.Stat(f); err != nil {
log.Printf("Unable to stat file: %s", f)
return false, err
}
} }
return true, nil return true, nil