Skip to content

Commit

Permalink
pull, add-environment: don't mangle bools when rewriting .skeema
Browse files Browse the repository at this point in the history
Whenever an existing .skeema option file is being rewritten during execution
of `skeema pull` (e.g. due to change in flavor) or `skeema add-environment`,
previously any boolean option values in the file would be mangled in a
confusing way. The options still worked properly but were hard to read;
enabled bool options would be set to a value of 1, and disabled bool options
would be set to an empty string.

This commit updates the mybase dep to fix this problem. Now bool options are
written in their canonical format: "foo" to enable, "skip-foo" to disable, no
equals sign or value present in either case.
  • Loading branch information
evanelias committed Jan 5, 2021
1 parent 97e914c commit c41c437
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 30 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -66,7 +66,7 @@ Support for partitioned tables generously sponsored by [Etsy](https://www.etsy.c

## License

**Copyright 2020 Skeema LLC**
**Copyright 2021 Skeema LLC**

```text
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -11,7 +11,7 @@ require (
github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481
github.com/opencontainers/runc v1.0.0-rc5 // indirect
github.com/sirupsen/logrus v1.4.2
github.com/skeema/mybase v1.0.12-0.20201218182149-9bf088e98525
github.com/skeema/mybase v1.0.13
github.com/skeema/tengo v0.9.7-0.20201215220818-6707a59a4c0f
golang.org/x/lint v0.0.0-20190409202823-959b441ac422
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -128,8 +128,8 @@ github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvH
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/skeema/mybase v1.0.12-0.20201218182149-9bf088e98525 h1:eBtHRmy1iTx3p5mRqExr3jnntQu92D8rUXzJNsyIpxQ=
github.com/skeema/mybase v1.0.12-0.20201218182149-9bf088e98525/go.mod h1:QIVXHvABKRem2FHkOv5lP8uQlQyc2x9GV4vIqq6tBcY=
github.com/skeema/mybase v1.0.13 h1:0wO6MyVexyvyRzghOaYpJaHnqoGbrTETpzeK0+W47Kk=
github.com/skeema/mybase v1.0.13/go.mod h1:QIVXHvABKRem2FHkOv5lP8uQlQyc2x9GV4vIqq6tBcY=
github.com/skeema/tengo v0.9.7-0.20201215220818-6707a59a4c0f h1:8yODpzURNS0s6CH0AyxcWzJ3ChPrfejNTUcU9sSNDbI=
github.com/skeema/tengo v0.9.7-0.20201215220818-6707a59a4c0f/go.mod h1:OXoEN3BZgDYLGfsNZEQrHWYWTYxI4/8dOVjGHaXug2k=
github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
Expand Down
4 changes: 2 additions & 2 deletions vendor/github.com/skeema/mybase/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions vendor/github.com/skeema/mybase/config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 28 additions & 3 deletions vendor/github.com/skeema/mybase/file.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 18 additions & 14 deletions vendor/github.com/skeema/mybase/option.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Expand Up @@ -98,7 +98,7 @@ github.com/pmezard/go-difflib/difflib
# github.com/sirupsen/logrus v1.4.2
## explicit
github.com/sirupsen/logrus
# github.com/skeema/mybase v1.0.12-0.20201218182149-9bf088e98525
# github.com/skeema/mybase v1.0.13
## explicit
github.com/skeema/mybase
# github.com/skeema/tengo v0.9.7-0.20201215220818-6707a59a4c0f
Expand Down

0 comments on commit c41c437

Please sign in to comment.