Skip to content

Commit ba3d5fb

Browse files
authored
Update binary name to tfplugingen-openapi (#54)
* update binary name * gitignore
1 parent 32cfb77 commit ba3d5fb

File tree

6 files changed

+11
-12
lines changed

6 files changed

+11
-12
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*.so
66
*.dylib
77

8-
terraform-plugin-codegen-openapi
9-
108
# Test binary, built with `go test -c`
119
*.test
1210

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
build:
2+
go build ./cmd/tfplugingen-openapi
3+
14
lint:
25
golangci-lint run
36

@@ -13,22 +16,22 @@ generate:
1316

1417
# Regenerate testdata folder
1518
testdata:
16-
go run ./cmd/terraform-plugin-codegen-openapi generate \
19+
go run ./cmd/tfplugingen-openapi generate \
1720
--config ./internal/cmd/testdata/petstore3/tfopenapigen_config.yml \
1821
./internal/cmd/testdata/petstore3/openapi_spec.json \
1922
> ./internal/cmd/testdata/petstore3/generated_framework_ir.json
2023

21-
go run ./cmd/terraform-plugin-codegen-openapi generate \
24+
go run ./cmd/tfplugingen-openapi generate \
2225
--config ./internal/cmd/testdata/github/tfopenapigen_config.yml \
2326
./internal/cmd/testdata/github/openapi_spec.json \
2427
> ./internal/cmd/testdata/github/generated_framework_ir.json
2528

26-
go run ./cmd/terraform-plugin-codegen-openapi generate \
29+
go run ./cmd/tfplugingen-openapi generate \
2730
--config ./internal/cmd/testdata/scaleway/tfopenapigen_config.yml \
2831
./internal/cmd/testdata/scaleway/openapi_spec.yml \
2932
> ./internal/cmd/testdata/scaleway/generated_framework_ir.json
3033

31-
go run ./cmd/terraform-plugin-codegen-openapi generate \
34+
go run ./cmd/tfplugingen-openapi generate \
3235
--config ./internal/cmd/testdata/edgecase/tfopenapigen_config.yml \
3336
./internal/cmd/testdata/edgecase/openapi_spec.yml \
3437
> ./internal/cmd/testdata/edgecase/generated_framework_ir.json

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ _Experimental: This code is under active development and not intended for produc
44

55
## Running an example spec
66
```sh
7-
# Build the binary
8-
go build ./cmd/terraform-plugin-codegen-openapi
7+
make build
98

109
# Pass generator config to --config and OpenAPI spec (JSON or YML) as positional argument
1110
# Outputs to STDOUT
12-
./terraform-plugin-codegen-openapi generate --config ./internal/cmd/testdata/petstore3/tfopenapigen_config.yml ./internal/cmd/testdata/petstore3/openapi_spec.json
11+
./tfplugingen-openapi generate --config ./internal/cmd/testdata/petstore3/tfopenapigen_config.yml ./internal/cmd/testdata/petstore3/openapi_spec.json
1312
```

cmd/terraform-plugin-codegen-openapi/main.go renamed to cmd/tfplugingen-openapi/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ import (
1414
)
1515

1616
func main() {
17-
// TODO: Temporary name for CLI :)
18-
name := "terraform-plugin-codegen-openapi"
17+
name := "tfplugingen-openapi"
1918
version := name + " Version " + version
2019
if commit != "" {
2120
version += " from commit " + commit
File renamed without changes.

internal/cmd/generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (cmd *GenerateCommand) Help() string {
4949
}
5050
})
5151

52-
strBuilder.WriteString("\nUsage: tfopenapigen generate [<args>] </path/to/oas_file.yml>\n\n")
52+
strBuilder.WriteString("\nUsage: tfplugingen-openapi generate [<args>] </path/to/oas_file.yml>\n\n")
5353
cmd.Flags().VisitAll(func(f *flag.Flag) {
5454
if f.DefValue != "" {
5555
strBuilder.WriteString(fmt.Sprintf(" --%s <ARG> %s%s%s (default: %q)\n",

0 commit comments

Comments
 (0)