Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
Reduce output noise for publish-github. Bump to v0.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Am Laher committed Jun 21, 2015
1 parent ad76e64 commit e606be6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .goxc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"ResourcesInclude": "README.md,.\\_test1/*,_test2",
"ResourcesExclude": "*.go",
"PackageVersion": "0.16.11",
"PackageVersion": "0.17.0",
"TaskSettings": {
"archive-zip": {},
"bintray": {
Expand Down Expand Up @@ -44,7 +44,7 @@
},
"publish-github": {
"owner": "laher",
"prerelease": true,
"prerelease": false,
"repository": "goxc"
},
"xc": {
Expand All @@ -62,4 +62,4 @@
"Env": [
"GOPATH=Godeps{{.PLS}}{{.Env.GOPATH}}"
]
}
}
20 changes: 7 additions & 13 deletions tasks/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,6 @@ func RunTaskPubGH(tp tasks.TaskParams) error {
return err
}
defer out.Close()
// fileheader := tp.Settings.GetTaskSettingString(tasks.TASK_PUBLISH_GITHUB, "fileheader")
//if fileheader != "" {
//_, err = fmt.Fprintf(f, "%s\n\n", fileheader)
//}
// _, err = fmt.Fprintf(f, "%s downloads (version %s)\n-------------\n", tp.AppName, tp.Settings.GetFullVersionName())
// if !tp.Settings.IsQuiet() {
// log.Printf("Read directory %s", versionDir)
// }
//for 'first entry in dir' detection.
dirs := []string{}
err = filepath.Walk(versionDir, func(path string, info os.FileInfo, e error) error {
Expand All @@ -143,7 +135,7 @@ func ghWalkFunc(fullPath string, fi2 os.FileInfo, err error, reportFilename stri
versionDir := filepath.Join(tp.OutDestRoot, tp.Settings.GetFullVersionName())
relativePath := strings.Replace(fullPath, versionDir, "", -1)
relativePath = strings.TrimPrefix(relativePath, "/")
fmt.Printf("relative path %s, full path %s\n", relativePath, fullPath)
//fmt.Printf("relative path %s, full path %s\n", relativePath, fullPath)
if fi2.IsDir() {
//check globs ...
for _, excludeGlob := range excludeGlobs {
Expand All @@ -152,7 +144,7 @@ func ghWalkFunc(fullPath string, fi2 os.FileInfo, err error, reportFilename stri
return err
}
if ok {
if !tp.Settings.IsQuiet() {
if tp.Settings.IsVerbose() {
log.Printf("Excluded: %s (pattern %v)", relativePath, excludeGlob)
}
return filepath.SkipDir
Expand Down Expand Up @@ -189,7 +181,7 @@ func ghWalkFunc(fullPath string, fi2 os.FileInfo, err error, reportFilename stri
}
}
if matches == false {
if !tp.Settings.IsQuiet() {
if tp.Settings.IsVerbose() {
log.Printf("Not included: %s (pattern %v)", relativePath, includeResources)
}
return nil
Expand All @@ -200,7 +192,7 @@ func ghWalkFunc(fullPath string, fi2 os.FileInfo, err error, reportFilename stri
return err
}
if ok {
if !tp.Settings.IsQuiet() {
if tp.Settings.IsVerbose() {
log.Printf("Excluded: %s (pattern %v)", relativePath, excludeGlob)
}
return nil
Expand Down Expand Up @@ -307,8 +299,10 @@ func ghDoUpload(apiHost, apikey, owner, repository, release, relativePath, fullP
return err
}
}
if !isQuiet {
if isVerbose {
log.Printf("File uploaded. Response: %v", resp)
} else if !isQuiet {
log.Printf("File uploaded.")
}
return err
}
Expand Down

0 comments on commit e606be6

Please sign in to comment.