Skip to content

Commit

Permalink
Update github.com/StackExchange/dnscontrol/v2
Browse files Browse the repository at this point in the history
  • Loading branch information
tlimoncelli committed Apr 14, 2020
1 parent 2a44a89 commit 24b7d06
Show file tree
Hide file tree
Showing 70 changed files with 182 additions and 172 deletions.
2 changes: 1 addition & 1 deletion build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var goos = flag.String("os", "", "OS to build (linux, windows, or darwin) Defaul
func main() {
flag.Parse()
flags := fmt.Sprintf(`-s -w -X main.SHA="%s" -X main.BuildTime=%d`, getVersion(), time.Now().Unix())
pkg := "github.com/StackExchange/dnscontrol/v2"
pkg := "github.com/StackExchange/dnscontrol/v3"

build := func(out, goos string) {
log.Printf("Building %s", out)
Expand Down
4 changes: 2 additions & 2 deletions build/generate/featureMatrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"io/ioutil"
"sort"

"github.com/StackExchange/dnscontrol/v2/providers"
_ "github.com/StackExchange/dnscontrol/v2/providers/_all"
"github.com/StackExchange/dnscontrol/v3/providers"
_ "github.com/StackExchange/dnscontrol/v3/providers/_all"
)

func generateFeatureMatrix() error {
Expand Down
4 changes: 2 additions & 2 deletions cmd/convertzone/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ import (
"github.com/miekg/dns"
"github.com/miekg/dns/dnsutil"

"github.com/StackExchange/dnscontrol/v2/pkg/prettyzone"
"github.com/StackExchange/dnscontrol/v2/providers/octodns/octoyaml"
"github.com/StackExchange/dnscontrol/v3/pkg/prettyzone"
"github.com/StackExchange/dnscontrol/v3/providers/octodns/octoyaml"
)

var flagInfmt = flag.String("in", "zone", "zone|octodns")
Expand Down
4 changes: 2 additions & 2 deletions commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/urfave/cli/v2"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
)

// categories of commands
Expand Down
2 changes: 1 addition & 1 deletion commands/createDomains.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package commands
import (
"fmt"

"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v3/providers"
"github.com/urfave/cli/v2"
)

Expand Down
8 changes: 4 additions & 4 deletions commands/getCerts.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"regexp"
"strings"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/acme"
"github.com/StackExchange/dnscontrol/v2/pkg/normalize"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/StackExchange/dnscontrol/v3/pkg/acme"
"github.com/StackExchange/dnscontrol/v3/pkg/normalize"
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
"github.com/urfave/cli/v2"
)

Expand Down
8 changes: 4 additions & 4 deletions commands/getZones.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"os"
"strings"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/prettyzone"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/config"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/StackExchange/dnscontrol/v3/pkg/prettyzone"
"github.com/StackExchange/dnscontrol/v3/providers"
"github.com/StackExchange/dnscontrol/v3/providers/config"
"github.com/urfave/cli/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion commands/gz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/andreyvit/diff"

_ "github.com/StackExchange/dnscontrol/v2/providers/_all"
_ "github.com/StackExchange/dnscontrol/v3/providers/_all"
)

func TestFormatTypes(t *testing.T) {
Expand Down
14 changes: 7 additions & 7 deletions commands/previewPush.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (

"github.com/urfave/cli/v2"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/nameservers"
"github.com/StackExchange/dnscontrol/v2/pkg/normalize"
"github.com/StackExchange/dnscontrol/v2/pkg/notifications"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v2/providers/config"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/StackExchange/dnscontrol/v3/pkg/nameservers"
"github.com/StackExchange/dnscontrol/v3/pkg/normalize"
"github.com/StackExchange/dnscontrol/v3/pkg/notifications"
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
"github.com/StackExchange/dnscontrol/v3/providers"
"github.com/StackExchange/dnscontrol/v3/providers/config"
)

var _ = cmd(catMain, func() *cli.Command {
Expand Down
6 changes: 3 additions & 3 deletions commands/printIR.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/urfave/cli/v2"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/js"
"github.com/StackExchange/dnscontrol/v2/pkg/normalize"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/StackExchange/dnscontrol/v3/pkg/js"
"github.com/StackExchange/dnscontrol/v3/pkg/normalize"
)

var _ = cmd(catDebug, func() *cli.Command {
Expand Down
2 changes: 1 addition & 1 deletion docs/flattener/js.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http"
"strings"

"github.com/StackExchange/dnscontrol/v2/pkg/spflib"
"github.com/StackExchange/dnscontrol/v3/pkg/spflib"
"github.com/gopherjs/jquery"
)

Expand Down
14 changes: 12 additions & 2 deletions docs/release-engineering.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,25 @@ how it tests that gofmt was run.
Edit the "Version" variable in `main.go` and commit.

```
export PREVVERSION=2.10.0 <<< Change to the previous version
export VERSION=2.11.0 <<< Change to the new release version
export PREVVERSION=3.0.0 <<< Change to the previous version
export VERSION=3.1.0 <<< Change to the new release version
git checkout master
vi main.go
git commit -m'Release v'"$VERSION" main.go
git tag v"$VERSION"
git push origin tag v"$VERSION"
```

NOTE: If you bump the major version, you need to change all the source
files. The last time this was done (v2 -> v3) these two commands
automated all that:

```
# Make all the changes:
sed -i.bak -e 's@github.com.StackExchange.dnscontrol.v2@github.com/StackExchange/dnscontrol/v3@g' go.* $(fgrep -lri --include '*.go' github.com/StackExchange/dnscontrol/v2 *)
# Delete the backup files:
find * -name \*.bak -delete
```

## Step 4. Write the release notes.

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/StackExchange/dnscontrol/v2
module github.com/StackExchange/dnscontrol/v3

go 1.14

Expand Down
10 changes: 5 additions & 5 deletions integrationTest/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (

"github.com/miekg/dns/dnsutil"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/nameservers"
"github.com/StackExchange/dnscontrol/v2/providers"
_ "github.com/StackExchange/dnscontrol/v2/providers/_all"
"github.com/StackExchange/dnscontrol/v2/providers/config"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/StackExchange/dnscontrol/v3/pkg/nameservers"
"github.com/StackExchange/dnscontrol/v3/providers"
_ "github.com/StackExchange/dnscontrol/v3/providers/_all"
"github.com/StackExchange/dnscontrol/v3/providers/config"
)

var providerToRun = flag.String("provider", "", "Provider to run")
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strconv"
"time"

"github.com/StackExchange/dnscontrol/v2/commands"
_ "github.com/StackExchange/dnscontrol/v2/providers/_all"
"github.com/StackExchange/dnscontrol/v3/commands"
_ "github.com/StackExchange/dnscontrol/v3/providers/_all"
)

//go:generate go run build/generate/generate.go build/generate/featureMatrix.go
Expand Down
6 changes: 3 additions & 3 deletions pkg/acme/acme.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"strings"
"time"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/nameservers"
"github.com/StackExchange/dnscontrol/v2/pkg/notifications"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/StackExchange/dnscontrol/v3/pkg/nameservers"
"github.com/StackExchange/dnscontrol/v3/pkg/notifications"
"github.com/go-acme/lego/certcrypto"
"github.com/go-acme/lego/certificate"
"github.com/go-acme/lego/challenge"
Expand Down
4 changes: 2 additions & 2 deletions pkg/diff/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/gobwas/glob"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
)

// Correlation stores a difference between two domains.
Expand Down
2 changes: 1 addition & 1 deletion pkg/diff/diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v3/models"
)

func myRecord(s string) *models.RecordConfig {
Expand Down
6 changes: 3 additions & 3 deletions pkg/js/js.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/robertkrimen/otto" // load underscore js into vm by default
_ "github.com/robertkrimen/otto/underscore" // required by otto

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/StackExchange/dnscontrol/v2/pkg/transform"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
"github.com/StackExchange/dnscontrol/v3/pkg/transform"
)

// currentDirectory is the current directory as used by require().
Expand Down
2 changes: 1 addition & 1 deletion pkg/nameservers/nameservers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"strconv"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v3/models"
)

// DetermineNameservers will find all nameservers we should use for a domain. It follows the following rules:
Expand Down
4 changes: 2 additions & 2 deletions pkg/normalize/flatten.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"strings"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/spflib"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/StackExchange/dnscontrol/v3/pkg/spflib"
)

// hasSpfRecords returns true if this record requests SPF unrolling.
Expand Down
2 changes: 1 addition & 1 deletion pkg/normalize/importTransform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package normalize
import (
"testing"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v3/models"
)

func makeRC(label, domain, target string, rc models.RecordConfig) *models.RecordConfig {
Expand Down
6 changes: 3 additions & 3 deletions pkg/normalize/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"net"
"strings"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/transform"
"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/StackExchange/dnscontrol/v3/pkg/transform"
"github.com/StackExchange/dnscontrol/v3/providers"
"github.com/miekg/dns"
"github.com/miekg/dns/dnsutil"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/normalize/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"fmt"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v3/models"
)

func TestCheckLabel(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/prettyzone/prettyzone.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"sort"
"strings"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/miekg/dns"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/prettyzone/prettyzone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"math/rand"
"testing"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/miekg/dns"
"github.com/miekg/dns/dnsutil"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/prettyzone/sorting.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strconv"
"strings"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v3/models"
)

// ZoneGenData is the configuration description for the zone generator.
Expand Down
2 changes: 1 addition & 1 deletion pkg/printer/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"strings"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v3/models"
)

// CLI is an abstraction around the CLI.
Expand Down
44 changes: 22 additions & 22 deletions providers/_all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@ package all

import (
// Define all known providers here. They should each register themselves with the providers package via init function.
_ "github.com/StackExchange/dnscontrol/v2/providers/activedir"
_ "github.com/StackExchange/dnscontrol/v2/providers/azuredns"
_ "github.com/StackExchange/dnscontrol/v2/providers/bind"
_ "github.com/StackExchange/dnscontrol/v2/providers/cloudflare"
_ "github.com/StackExchange/dnscontrol/v2/providers/cloudns"
_ "github.com/StackExchange/dnscontrol/v2/providers/digitalocean"
_ "github.com/StackExchange/dnscontrol/v2/providers/dnsimple"
_ "github.com/StackExchange/dnscontrol/v2/providers/exoscale"
_ "github.com/StackExchange/dnscontrol/v2/providers/gandi_v5"
_ "github.com/StackExchange/dnscontrol/v2/providers/gcloud"
_ "github.com/StackExchange/dnscontrol/v2/providers/hexonet"
_ "github.com/StackExchange/dnscontrol/v2/providers/internetbs"
_ "github.com/StackExchange/dnscontrol/v2/providers/linode"
_ "github.com/StackExchange/dnscontrol/v2/providers/namecheap"
_ "github.com/StackExchange/dnscontrol/v2/providers/namedotcom"
_ "github.com/StackExchange/dnscontrol/v2/providers/ns1"
_ "github.com/StackExchange/dnscontrol/v2/providers/octodns"
_ "github.com/StackExchange/dnscontrol/v2/providers/opensrs"
_ "github.com/StackExchange/dnscontrol/v2/providers/ovh"
_ "github.com/StackExchange/dnscontrol/v2/providers/route53"
_ "github.com/StackExchange/dnscontrol/v2/providers/softlayer"
_ "github.com/StackExchange/dnscontrol/v2/providers/vultr"
_ "github.com/StackExchange/dnscontrol/v3/providers/activedir"
_ "github.com/StackExchange/dnscontrol/v3/providers/azuredns"
_ "github.com/StackExchange/dnscontrol/v3/providers/bind"
_ "github.com/StackExchange/dnscontrol/v3/providers/cloudflare"
_ "github.com/StackExchange/dnscontrol/v3/providers/cloudns"
_ "github.com/StackExchange/dnscontrol/v3/providers/digitalocean"
_ "github.com/StackExchange/dnscontrol/v3/providers/dnsimple"
_ "github.com/StackExchange/dnscontrol/v3/providers/exoscale"
_ "github.com/StackExchange/dnscontrol/v3/providers/gandi_v5"
_ "github.com/StackExchange/dnscontrol/v3/providers/gcloud"
_ "github.com/StackExchange/dnscontrol/v3/providers/hexonet"
_ "github.com/StackExchange/dnscontrol/v3/providers/internetbs"
_ "github.com/StackExchange/dnscontrol/v3/providers/linode"
_ "github.com/StackExchange/dnscontrol/v3/providers/namecheap"
_ "github.com/StackExchange/dnscontrol/v3/providers/namedotcom"
_ "github.com/StackExchange/dnscontrol/v3/providers/ns1"
_ "github.com/StackExchange/dnscontrol/v3/providers/octodns"
_ "github.com/StackExchange/dnscontrol/v3/providers/opensrs"
_ "github.com/StackExchange/dnscontrol/v3/providers/ovh"
_ "github.com/StackExchange/dnscontrol/v3/providers/route53"
_ "github.com/StackExchange/dnscontrol/v3/providers/softlayer"
_ "github.com/StackExchange/dnscontrol/v3/providers/vultr"
)
2 changes: 1 addition & 1 deletion providers/activedir/activedirProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"runtime"

"github.com/StackExchange/dnscontrol/v2/providers"
"github.com/StackExchange/dnscontrol/v3/providers"
)

// This is the struct that matches either (or both) of the Registrar and/or DNSProvider interfaces:
Expand Down
6 changes: 3 additions & 3 deletions providers/activedir/domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"strings"
"time"

"github.com/StackExchange/dnscontrol/v2/models"
"github.com/StackExchange/dnscontrol/v2/pkg/diff"
"github.com/StackExchange/dnscontrol/v2/pkg/printer"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
"github.com/TomOnTime/utfutil"
)

Expand Down
Loading

0 comments on commit 24b7d06

Please sign in to comment.