Skip to content

Commit

Permalink
fix a number of hof mod tests
Browse files Browse the repository at this point in the history
Signed-off-by: Tony Worm <tony@hofstadter.io>
  • Loading branch information
verdverm committed Aug 3, 2021
1 parent 7e12c32 commit f98d436
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 19 deletions.
1 change: 1 addition & 0 deletions cue.mods
Expand Up @@ -3,6 +3,7 @@ module github.com/hofstadter-io/hof
cue master

require (
github.com/hofstadter-io/ghacue v0.0.0
github.com/hofstadter-io/hofmod-cli v0.6.3
github.com/hofstadter-io/hofmod-cuefig v0.0.3
)
Expand Down
3 changes: 2 additions & 1 deletion lib/mod/cache/fetch.go
Expand Up @@ -121,6 +121,7 @@ func fetchGitHubBranch(FS billy.Filesystem, lang, owner, repo, branch string) er
if err != nil {
return err
}
branch = *r.DefaultBranch

fmt.Printf("%#+v\n", *r)
}
Expand All @@ -129,7 +130,7 @@ func fetchGitHubBranch(FS billy.Filesystem, lang, owner, repo, branch string) er

zReader, err := github.FetchBranchZip(client, branch)
if err != nil {
return fmt.Errorf("While fetching branch zipfile\n%w\n", err)
return fmt.Errorf("While fetching branch zipfile for %s/%s@%s\n%w\n", owner, repo, branch, err)
}

err = yagu.BillyLoadFromZip(zReader, FS, true)
Expand Down
1 change: 1 addition & 0 deletions lib/mod/langs/cue.go
Expand Up @@ -12,6 +12,7 @@ langs: cue: {
InitTemplates: {
"cue.mod/module.cue": """
module: "{{ .Module }}"
"""
}
VendorExcludeGlobs: [
Expand Down
2 changes: 1 addition & 1 deletion lib/mod/testdata/init__module_initd.txt
Expand Up @@ -6,6 +6,6 @@ stdout '^cue.mods already exists\n$'
-- cue.mods --
module github.com/test/existsmod

cue v0.2.0
cue v0.4.0
-- dummy-end --

2 changes: 1 addition & 1 deletion lib/mod/testdata/init__new_module.txt
Expand Up @@ -11,7 +11,7 @@ cmp cue.mod/module.cue match/cue.mod/module.cue
-- match/cue.mods --
module github.com/test/mod

cue v0.2.0
cue v0.4.0
-- match/cue.mod/module.cue --
module: "github.com/test/mod"
-- dummy_end --
Expand Down
6 changes: 3 additions & 3 deletions lib/mod/testdata/vendor__local_replace_no_require.txt
Expand Up @@ -6,23 +6,23 @@ exec hof mod vendor
-- cue.mods --
module github.com/test/mod

cue v0.2.0
cue v0.4.0

replace github.com/hofstadter-io/hof => ./simhof

-- cue.mod/module.cue --
module: "github.com/test/mod"

-- dummy_end --


-- simhof/cue.mods --
module github.com/hofstadter-io/hof

cue v0.2.0
cue v0.4.0

-- simhof/cue.mod/module.cue --
module: "github.com/hofstadter-io/hof"


-- dummy_end --

6 changes: 3 additions & 3 deletions lib/mod/testdata/vendor__local_replace_with_require.txt
Expand Up @@ -6,7 +6,7 @@ exec hof mod vendor
-- cue.mods --
module github.com/test/mod

cue v0.2.0
cue v0.4.0

require (
github.com/hofstadter-io/hof v0.0.0
Expand All @@ -16,17 +16,17 @@ replace github.com/hofstadter-io/hof => ./simhof

-- cue.mod/module.cue --
module: "github.com/test/mod"

-- dummy_end --


-- simhof/cue.mods --
module github.com/hofstadter-io/hof

cue v0.2.0
cue v0.4.0

-- simhof/cue.mod/module.cue --
module: "github.com/hofstadter-io/hof"


-- dummy_end --

2 changes: 1 addition & 1 deletion lib/mod/testdata/vendor__mod_file_errs.txt
Expand Up @@ -11,5 +11,5 @@ require (
github.com/hofstadter-io/hof v0.5.4
)

cue v0.2.0
cue v0.4.0
-- dummy-end --
2 changes: 1 addition & 1 deletion lib/mod/testdata/vendor__new_module.txt
Expand Up @@ -17,7 +17,7 @@ cmp cue.mod/module.cue match/cue.mod/module.cue
-- match/cue.mods --
module github.com/test/mod

cue v0.2.0
cue v0.4.0
-- match/cue.sums --
-- match/cue.mod/module.cue --
module: "github.com/test/mod"
Expand Down
20 changes: 12 additions & 8 deletions lib/mod/testdata/vendor__with_deps.txt
Expand Up @@ -4,13 +4,14 @@ exec hof mod vendor
-- cue.mods --
module github.com/test/withsolo

cue v0.2.0
cue v0.4.0

require (
github.com/hofstadter-io/hof v0.5.4
github.com/hofstadter-io/hof v0.5.16
)
-- cue.mod/module.cue --
module: "github.com/test/withsolo"

-- dummy_end --


Expand All @@ -21,14 +22,15 @@ exec hof mod vendor
-- cue.mods --
module github.com/test/withmulti

cue v0.2.0
cue v0.4.0

require (
github.com/hofstadter-io/hof v0.5.4
github.com/hofstadter-io/hofmod-cli v0.5.9
github.com/hofstadter-io/hof v0.5.16
github.com/hofstadter-io/hofmod-cli v0.7.2
)
-- cue.mod/module.cue --
module: "github.com/test/withmulti"

-- dummy_end --


Expand All @@ -38,13 +40,14 @@ exec hof mod vendor
-- cue.mods --
module github.com/test/mod-v000-a

cue v0.2.0
cue v0.4.0

require (
github.com/hofstadter-io/hofmod-cuefig v0.0.0
github.com/hofstadter-io/hof v0.0.0
)
-- cue.mod/module.cue --
module: "github.com/test/mod-v000-a"

-- dummy_end --

# hof mod vendor - BUG require v0.0.0 - B
Expand All @@ -53,13 +56,14 @@ exec hof mod vendor
-- cue.mods --
module github.com/test/mod-v000-b

cue v0.2.0
cue v0.4.0

require (
github.com/hofstadter-io/hofmod-cuefig v0.0.0
github.com/hofstadter-io/hof v0.0.0
)
-- cue.mod/module.cue --
module: "github.com/test/mod-v000-b"

-- dummy_end --

2 changes: 2 additions & 0 deletions lib/yagu/repos/github/client.go
Expand Up @@ -2,6 +2,7 @@ package github

import (
"context"
"fmt"
"os"

"golang.org/x/oauth2"
Expand All @@ -22,6 +23,7 @@ func NewClient() (client *github.Client, err error) {
client = github.NewClient(tc)

} else {
fmt.Println("Got Here GitHub")
client = github.NewClient(nil)
}

Expand Down

0 comments on commit f98d436

Please sign in to comment.