Skip to content

Commit

Permalink
Merge branch 'registry-fix' into 'master'
Browse files Browse the repository at this point in the history
fix: allow builds in either rackn or digitalrebar

See merge request rackn/terraform-provider-drp!98
  • Loading branch information
galthaus committed Mar 21, 2023
2 parents 86bf19d + ceec660 commit 097ba31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ builds:
flags:
- -trimpath
ldflags:
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
- '-s -w -X main.owner={{if eq .GitURL "https://github.com/rackn/terraform-provider-drp"}}rackn{{else}}digitalrebar{{end}} main.version={{.Version}} -X main.commit={{.Commit}}'
goos:
- freebsd
- windows
Expand Down
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"context"
"flag"
"fmt"
"log"

"github.com/hashicorp/terraform-plugin-framework/providerserver"
Expand All @@ -24,6 +25,8 @@ var (
// to appropriate values for the compiled binary.
version string = "dev"

owner string = "digitalrebar"

// goreleaser can pass other information to the main package, such as the specific commit
// https://goreleaser.com/cookbooks/using-main.version/
)
Expand All @@ -35,7 +38,7 @@ func main() {
flag.Parse()

opts := providerserver.ServeOpts{
Address: "registry.terraform.io/digitalrebar/drp",
Address: fmt.Sprintf("registry.terraform.io/%s/drp", owner),
Debug: debug,
}

Expand Down

0 comments on commit 097ba31

Please sign in to comment.