chore: rename artifacts
This commit is contained in:
@@ -53,7 +53,7 @@ jobs:
|
||||
- name: Upload binaries as artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux-bin
|
||||
name: bin-linux
|
||||
path: /dist
|
||||
|
||||
prepare-windows:
|
||||
@@ -120,7 +120,7 @@ jobs:
|
||||
- name: Upload binaries as artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: windows-bin
|
||||
name: bin-windows
|
||||
path: /dist
|
||||
|
||||
compile-linux:
|
||||
@@ -135,7 +135,7 @@ jobs:
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: linux-bin
|
||||
name: bin-linux
|
||||
path: ./bin
|
||||
|
||||
- name: Setup the Go programming language
|
||||
@@ -188,7 +188,7 @@ jobs:
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: windows-bin
|
||||
name: bin-windows
|
||||
path: ./bin
|
||||
|
||||
- name: Setup the Go programming language
|
||||
|
||||
@@ -1,14 +1,32 @@
|
||||
package setup
|
||||
|
||||
import "os"
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
func PrepareEnvironment() (bool, error) {
|
||||
if _, err := os.Stat("./bin"); err != nil {
|
||||
return false, err
|
||||
ok, err := fsCheck()
|
||||
|
||||
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 {
|
||||
return false, err
|
||||
for _, f := range files {
|
||||
if _, err := os.Stat(f); err != nil {
|
||||
log.Printf("Unable to stat file: %s", f)
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
|
||||
return true, nil
|
||||
|
||||
Reference in New Issue
Block a user