Compare commits
No commits in common. "a922c08eda87d65db4ca60e57a8a87ab6860d2c0" and "3f012c2b70b9b43d2ce5dc7b9a4665b668551431" have entirely different histories.
a922c08eda
...
3f012c2b70
5 changed files with 13 additions and 72 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +0,0 @@
|
||||||
gerritcp
|
|
|
@ -10,23 +10,23 @@ sites:
|
||||||
branch: chromeos-2016.05
|
branch: chromeos-2016.05
|
||||||
authentication: cookie
|
authentication: cookie
|
||||||
cookieName: o
|
cookieName: o
|
||||||
cookieValue: "{somefunnystring}"
|
cookieValue: {somefunnystring}
|
||||||
|
|
||||||
workstreams:
|
workstreams:
|
||||||
main:
|
main:
|
||||||
neverModify:
|
neverModify:
|
||||||
- util/crossgcc/
|
util/crossgcc/
|
||||||
- 3rdparty/
|
3rdparty/
|
||||||
- util/nvidia/cbootimage/
|
util/nvidia/cbootimage/
|
||||||
- .checkpatch.conf
|
.checkpatch.conf
|
||||||
- .gitmodules
|
.gitmodules
|
||||||
- OWNERS
|
OWNERS
|
||||||
coreboot-sdk:
|
coreboot-sdk:
|
||||||
onlyIfTouching:
|
onlyIfTouching:
|
||||||
- util/crossgcc/
|
util/crossgcc/
|
||||||
neverModify:
|
neverModify:
|
||||||
- 3rdparty/
|
3rdparty/
|
||||||
- util/nvidia/cbootimage/
|
util/nvidia/cbootimage/
|
||||||
- .checkpatch.conf
|
.checkpatch.conf
|
||||||
- .gitmodules
|
.gitmodules
|
||||||
- OWNERS
|
OWNERS
|
||||||
|
|
50
gerritcp.go
50
gerritcp.go
|
@ -1,50 +0,0 @@
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"flag"
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"gopkg.in/yaml.v2"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Repo struct {
|
|
||||||
Url string `yaml:"url"`
|
|
||||||
Repo string `yaml:"repo"`
|
|
||||||
Branch string `yaml:"branch"`
|
|
||||||
Authentication string `yaml:"authentication"`
|
|
||||||
CookieName string `yaml:"cookieName"`
|
|
||||||
CookieValue string `yaml:"cookieValue"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Workstreams struct {
|
|
||||||
OnlyIfTouching []string `yaml:"onlyIfTouching"`
|
|
||||||
NeverModify []string `yaml:"neverModify"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type configFormat struct {
|
|
||||||
Sites map[string]Repo `yaml:"sites"`
|
|
||||||
Workstreams map[string]Workstreams `yaml:"workstreams"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
// dir := flag.String("dir", "repo", "path to local git repo")
|
|
||||||
configFile := flag.String("config", "config.yaml", "path to configuration")
|
|
||||||
flag.Parse()
|
|
||||||
|
|
||||||
file, err := os.Open(*configFile)
|
|
||||||
if err != nil {
|
|
||||||
panic(fmt.Sprintf("Could not open '%s': %s", *configFile, err))
|
|
||||||
}
|
|
||||||
defer file.Close()
|
|
||||||
|
|
||||||
config := new(configFormat)
|
|
||||||
|
|
||||||
configDecoder := yaml.NewDecoder(file)
|
|
||||||
err = configDecoder.Decode(&config)
|
|
||||||
if err != nil {
|
|
||||||
panic(fmt.Sprintf("Failed parsing '%s': %s", *configFile, err))
|
|
||||||
}
|
|
||||||
|
|
||||||
fmt.Println(config)
|
|
||||||
}
|
|
5
go.mod
5
go.mod
|
@ -1,5 +0,0 @@
|
||||||
module review.coreboot.org/gerritcp/v2
|
|
||||||
|
|
||||||
go 1.17
|
|
||||||
|
|
||||||
require gopkg.in/yaml.v2 v2.4.0
|
|
3
go.sum
3
go.sum
|
@ -1,3 +0,0 @@
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
||||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
|
||||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
|
Loading…
Reference in a new issue