Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #167 from ulucinar/call-prepare
Browse files Browse the repository at this point in the history
Directions for calling ./hack/prepare.sh in the provider guide
  • Loading branch information
ulucinar authored Dec 3, 2021
2 parents 0219bf9 + 0a59b3f commit 3f0d22f
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions docs/generating-a-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,11 @@ be quite similar for any other Terraform provider.
export ProviderNameUpper=GitHub
```

2. Replace all occurrences of `template` with your provider name:
2. Run the `./hack/prepare.sh` script from repo root to prepare the repo, e.g., to
replace all occurrences of `template` with your provider name:

```bash
git grep -l 'template' -- './*' ':!build/**' ':!go.sum' | xargs sed -i.bak "s/template/${ProviderNameLower}/g"
git grep -l 'Template' -- './*' ':!build/**' ':!go.sum' | xargs sed -i.bak "s/Template/${ProviderNameUpper}/g"
# Clean up the .bak files created by sed
git clean -fd
git mv "internal/clients/template.go" "internal/clients/${ProviderNameLower}.go"
git mv "cluster/images/provider-jet-template" "cluster/images/provider-jet-${ProviderNameLower}"
git mv "cluster/images/provider-jet-template-controller" "cluster/images/provider-jet-${ProviderNameLower}-controller"
./hack/prepare.sh
```

4. Configure your repo for the Terraform provider binary and schema:
Expand Down

0 comments on commit 3f0d22f

Please sign in to comment.