Skip to content

Commit 333c311

Browse files
committed
bt: Update cueutils dependency
1 parent 104681d commit 333c311

File tree

5 files changed

+43
-37
lines changed

5 files changed

+43
-37
lines changed

bt/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func Read(ctx context.Context, value *cue.Value, filename string, configFH io.Re
110110
configs = append(configs, cueutils.CueConfigFile{Data: configFH, Name: filename})
111111

112112
c := Config{}
113-
err = cueutils.Unmarshal(configs, "", "bt", value, &c)
113+
err = cueutils.Unmarshal(configs, "", "bt", "bt.cue", value, &c)
114114
if err != nil {
115115
return nil, fmt.Errorf("failed to unmarshal: %w", err)
116116
}

bt/go.mod

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
module github.com/DavidGamba/dgtools/bt
22

3-
go 1.23
3+
go 1.23.0
4+
5+
toolchain go1.24.0
46

57
require (
68
cuelang.org/go v0.12.0
79
github.com/DavidGamba/dgtools/buildutils v0.6.0
8-
github.com/DavidGamba/dgtools/cueutils v0.4.0
10+
github.com/DavidGamba/dgtools/cueutils v0.4.1-0.20250225081445-104681d37b85
911
github.com/DavidGamba/dgtools/fsmodtime v0.3.0
1012
github.com/DavidGamba/dgtools/run v0.9.0
1113
github.com/DavidGamba/go-getoptions v0.31.0
@@ -14,7 +16,7 @@ require (
1416
)
1517

1618
require (
17-
cuelabs.dev/go/oci/ociregistry v0.0.0-20241125120445-2c00c104c6e1 // indirect
19+
cuelabs.dev/go/oci/ociregistry v0.0.0-20250224124241-b27552d3e05c // indirect
1820
github.com/agext/levenshtein v1.2.3 // indirect
1921
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
2022
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
@@ -27,15 +29,15 @@ require (
2729
github.com/opencontainers/go-digest v1.0.0 // indirect
2830
github.com/opencontainers/image-spec v1.1.0 // indirect
2931
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
30-
github.com/protocolbuffers/txtpbfmt v0.0.0-20250129171521-feedd8250727 // indirect
31-
github.com/rogpeppe/go-internal v1.13.2-0.20241226121412-a5dc8ff20d0a // indirect
32+
github.com/protocolbuffers/txtpbfmt v0.0.0-20250218085312-1ee4910263ac // indirect
33+
github.com/rogpeppe/go-internal v1.14.0 // indirect
3234
github.com/zclconf/go-cty v1.16.2 // indirect
33-
golang.org/x/mod v0.22.0 // indirect
34-
golang.org/x/net v0.34.0 // indirect
35-
golang.org/x/oauth2 v0.25.0 // indirect
36-
golang.org/x/sync v0.10.0 // indirect
37-
golang.org/x/sys v0.29.0 // indirect
38-
golang.org/x/text v0.21.0 // indirect
35+
golang.org/x/mod v0.23.0 // indirect
36+
golang.org/x/net v0.35.0 // indirect
37+
golang.org/x/oauth2 v0.27.0 // indirect
38+
golang.org/x/sync v0.11.0 // indirect
39+
golang.org/x/sys v0.30.0 // indirect
40+
golang.org/x/text v0.22.0 // indirect
3941
golang.org/x/tools v0.29.0 // indirect
4042
gopkg.in/yaml.v3 v3.0.1 // indirect
4143
)

bt/go.sum

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
cuelabs.dev/go/oci/ociregistry v0.0.0-20241125120445-2c00c104c6e1 h1:mRwydyTyhtRX2wXS3mqYWzR2qlv6KsmoKXmlz5vInjg=
2-
cuelabs.dev/go/oci/ociregistry v0.0.0-20241125120445-2c00c104c6e1/go.mod h1:5A4xfTzHTXfeVJBU6RAUf+QrlfTCW+017q/QiW+sMLg=
1+
cuelabs.dev/go/oci/ociregistry v0.0.0-20250224124241-b27552d3e05c h1:S5/hNrVIQCcKO3+p5intNgkkaINxALzQRhG7ckPiKXc=
2+
cuelabs.dev/go/oci/ociregistry v0.0.0-20250224124241-b27552d3e05c/go.mod h1:ZF0FdwCKQOehpnB5F79FRzvoqYdwz4Dh8pCtxdojvUc=
33
cuelang.org/go v0.12.0 h1:q4W5I+RtDIA27rslQyyt6sWkXX0YS9qm43+U1/3e0kU=
44
cuelang.org/go v0.12.0/go.mod h1:B4+kjvGGQnbkz+GuAv1dq/R308gTkp0sO28FdMrJ2Kw=
55
github.com/DavidGamba/dgtools/buildutils v0.6.0 h1:sbiwJPAdbXF+Gc8L9C+BldaaMRje/qf5BfVYyp0qBMk=
66
github.com/DavidGamba/dgtools/buildutils v0.6.0/go.mod h1:j7DC6tKOOoMy4s6ICP220y2jgRlIGpzLH2wXZo2WF7g=
7-
github.com/DavidGamba/dgtools/cueutils v0.4.0 h1:dnvbn3KOo6ewJ3ZjPMFrN/wri9mZhYMyN1nGre4kK/k=
8-
github.com/DavidGamba/dgtools/cueutils v0.4.0/go.mod h1:Xvt4NUYGfvOLFTMiiA7815qk0C3s0qo9hajDjFpKG1c=
7+
github.com/DavidGamba/dgtools/cueutils v0.4.1-0.20250225081445-104681d37b85 h1:J4tl05FYpJlRkgef5YeXHwZxvkvNEr+L08FhA18++oU=
8+
github.com/DavidGamba/dgtools/cueutils v0.4.1-0.20250225081445-104681d37b85/go.mod h1:be2yef8dRTdMZtGGQrUdA/rw+d6pBd4t9uqYy73AbkA=
99
github.com/DavidGamba/dgtools/fsmodtime v0.3.0 h1:unnbwD+JSadgcqlBI2v524dWcX6dxqD44TSAP5V7sA8=
1010
github.com/DavidGamba/dgtools/fsmodtime v0.3.0/go.mod h1:ruwqMvW2pWDbSQlAupP7F0QaojfbuXPyUOUKR4Ev3pQ=
1111
github.com/DavidGamba/dgtools/run v0.9.0 h1:Hg0v4ExUMd6Vzf9x9Bqr2yxreZtZpqlcAi8tI86QtIM=
@@ -56,29 +56,29 @@ github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNH
5656
github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc=
5757
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
5858
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
59-
github.com/protocolbuffers/txtpbfmt v0.0.0-20250129171521-feedd8250727 h1:A8EM8fVuYc0qbVMw9D6EiKdKTIm1SmLvAWcCc2mipGY=
60-
github.com/protocolbuffers/txtpbfmt v0.0.0-20250129171521-feedd8250727/go.mod h1:VmWrOlMnBZNtToCWzRlZlIXcJqjo0hS5dwQbRD62gL8=
61-
github.com/rogpeppe/go-internal v1.13.2-0.20241226121412-a5dc8ff20d0a h1:w3tdWGKbLGBPtR/8/oO74W6hmz0qE5q0z9aqSAewaaM=
62-
github.com/rogpeppe/go-internal v1.13.2-0.20241226121412-a5dc8ff20d0a/go.mod h1:S8kfXMp+yh77OxPD4fdM6YUknrZpQxLhvxzS4gDHENY=
59+
github.com/protocolbuffers/txtpbfmt v0.0.0-20250218085312-1ee4910263ac h1:z+FTTd26v+I74+mREe7y2rhU+J1WyiUgYoCSPX8rTxk=
60+
github.com/protocolbuffers/txtpbfmt v0.0.0-20250218085312-1ee4910263ac/go.mod h1:BnHogPTyzYAReeQLZrOxyxzS739DaTNtTvohVdbENmA=
61+
github.com/rogpeppe/go-internal v1.14.0 h1:unbRd941gNa8SS77YznHXOYVBDgWcF9xhzECdm8juZc=
62+
github.com/rogpeppe/go-internal v1.14.0/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
6363
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
6464
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
6565
github.com/zclconf/go-cty v1.16.2 h1:LAJSwc3v81IRBZyUVQDUdZ7hs3SYs9jv0eZJDWHD/70=
6666
github.com/zclconf/go-cty v1.16.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE=
6767
github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo=
6868
github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM=
69-
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
70-
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
71-
golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
72-
golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
73-
golang.org/x/oauth2 v0.25.0 h1:CY4y7XT9v0cRI9oupztF8AgiIu99L/ksR/Xp/6jrZ70=
74-
golang.org/x/oauth2 v0.25.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
75-
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
76-
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
69+
golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM=
70+
golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
71+
golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
72+
golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
73+
golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M=
74+
golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
75+
golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
76+
golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
7777
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
78-
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
79-
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
80-
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
81-
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
78+
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
79+
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
80+
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
81+
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
8282
golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE=
8383
golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588=
8484
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

bt/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ func program(args []string) int {
5454

5555
opt := getoptions.New()
5656
opt.Self("", "Terraform build system built as a no lock-in wrapper")
57-
opt.Bool("quiet", false, opt.GetEnv("QUIET"))
57+
opt.Bool("quiet", false, opt.GetEnv("BT_QUIET"))
58+
opt.Bool("debug", false, opt.GetEnv("BT_DEBUG"))
5859
opt.Bool("print-raw-config", false)
5960
opt.String("color", "auto", opt.Description("show colored output"), opt.ValidValues("always", "auto", "never"))
6061
opt.SetUnknownMode(getoptions.Pass)
@@ -79,6 +80,9 @@ func program(args []string) int {
7980
terraform.Logger.SetOutput(io.Discard)
8081
cueutils.Logger.SetOutput(io.Discard)
8182
}
83+
if opt.Called("debug") {
84+
cueutils.Logger.SetOutput(os.Stderr)
85+
}
8286

8387
if opt.Called("print-raw-config") {
8488
fmt.Printf("config value:\n%v\n", cfgValue)

bt/stack/config/config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ func Get(ctx context.Context, value *cue.Value, filename string) (*Config, strin
2323
f, err := buildutils.FindFileUpwards(ctx, filename)
2424
if err != nil {
2525
cfg := &Config{}
26-
return cfg, f, fmt.Errorf("failed to find config file: %w", err)
26+
return cfg, f, fmt.Errorf("failed to find stacks config file: %w", err)
2727
}
2828

2929
configFH, err := os.Open(f)
3030
if err != nil {
31-
return &Config{}, f, fmt.Errorf("failed to open config file '%s': %w", f, err)
31+
return &Config{}, f, fmt.Errorf("failed to open stacks config file '%s': %w", f, err)
3232
}
3333
defer configFH.Close()
3434

3535
cfg, err := Read(ctx, value, f, configFH)
3636
if err != nil {
37-
return &Config{}, f, fmt.Errorf("failed to read config: %w", err)
37+
return &Config{}, f, fmt.Errorf("failed to read stacks config: %w", err)
3838
}
3939

4040
cfg.ConfigFile = f
@@ -60,7 +60,7 @@ func Read(ctx context.Context, value *cue.Value, filename string, configFH io.Re
6060
}
6161

6262
c := Config{}
63-
err = cueutils.Unmarshal(configs, dir, "bt_stacks", value, &c)
63+
err = cueutils.Unmarshal(configs, dir, "bt_stacks", "bt.cue", value, &c)
6464
if err != nil {
6565
return nil, fmt.Errorf("failed to unmarshal: %w", err)
6666
}

0 commit comments

Comments
 (0)