Skip directories when moving build release artefacts in drone

This commit is contained in:
kolaente 2020-09-03 18:08:57 +02:00
parent 471d1b0ec5
commit 78b261e440
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -474,6 +474,11 @@ func runXgo(targets string) error {
RootPath)
if os.Getenv("DRONE_WORKSPACE") != "" {
return filepath.Walk("/build/", func(path string, info os.FileInfo, err error) error {
// Skip directories
if info.IsDir() {
return nil
}
return os.Rename(path, RootPath+"/"+DIST+"/binaries/"+info.Name())
})
}