Skip to content

Commit 5ac534b

Browse files
authored
Don't try to deploy nonexistent files (#212)
* Don't try to deploy nonexistent files * Don't try to deploy nonexistent files
1 parent 5c44571 commit 5ac534b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"bytes"
5+
"errors"
56
"fmt"
67
"html/template"
78
"os"
@@ -364,6 +365,11 @@ func logDeployFiles(files []deployment.DeployableItem, logger loggerV2.Logger) {
364365
func clearDeployFiles(filesToDeploy []string, logger loggerV2.Logger) []string {
365366
var clearedFilesToDeploy []string
366367
for _, pth := range filesToDeploy {
368+
_, err := os.Stat(pth)
369+
if err != nil && errors.Is(err, os.ErrNotExist) {
370+
logger.Warnf("file not found, skipping: %s", pth)
371+
continue
372+
}
367373
for _, fileBaseNameToSkip := range fileBaseNamesToSkip {
368374
if filepath.Base(pth) == fileBaseNameToSkip {
369375
logger.Warnf("skipping: %s", pth)

uploaders/apkuploader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func (u *Uploader) DeployAPK(item deployment.DeployableItem, artifacts []string,
1616
return nil, err
1717
}
1818

19-
u.logger.Printf("apk infos: %+v", printableAppInfo(apkInfo.AppInfo))
19+
u.logger.Printf("APK metadata: %+v", printableAppInfo(apkInfo.AppInfo))
2020

2121
splitMeta, err := androidartifact.CreateSplitArtifactMeta(u.logger, pth, artifacts)
2222
if err != nil {

0 commit comments

Comments
 (0)