Skip to content

Commit

Permalink
refactor(*): rename conform directory to pkg (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrynhard authored Jul 23, 2017
1 parent daa39f3 commit bd3404a
Show file tree
Hide file tree
Showing 18 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .conform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ tasks:
WORKDIR $GOPATH/src/github.com/{{ .Repository }}
COPY ./ ./
{{ if and .Git.IsClean .Git.IsTag }}
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /conform -ldflags "-X \"github.com/{{ .Repository }}/conform/version.Tag={{ trimAll "v" .Git.Tag }}\" -X \"github.com/{{ .Repository }}/conform/version.SHA={{ .Git.SHA }}\" -X \"github.com/{{ .Repository }}/conform/version.Built={{ .Built }}\""
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /conform -ldflags "-X \"github.com/{{ .Repository }}/pkg/version.Tag={{ trimAll "v" .Git.Tag }}\" -X \"github.com/{{ .Repository }}/pkg/version.SHA={{ .Git.SHA }}\" -X \"github.com/{{ .Repository }}/pkg/version.Built={{ .Built }}\""
{{ else if .Git.IsClean }}
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /conform -ldflags "-X \"github.com/{{ .Repository }}/conform/version.SHA={{ .Git.SHA }}\" -X \"github.com/{{ .Repository }}/conform/version.Built={{ .Built }}\""
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /conform -ldflags "-X \"github.com/{{ .Repository }}/pkg/version.SHA={{ .Git.SHA }}\" -X \"github.com/{{ .Repository }}/pkg/version.Built={{ .Built }}\""
{{ else }}
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /conform
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*
!cmd
!conform
!Gopkg*
!main.go
!pkg
!scripts
!vendor
2 changes: 1 addition & 1 deletion cmd/enforce.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"

"github.com/Masterminds/semver"
"github.com/autonomy/conform/conform"
conform "github.com/autonomy/conform/pkg"
"github.com/docker/docker/client"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package cmd

import (
"github.com/autonomy/conform/conform/version"
"github.com/autonomy/conform/pkg/version"
"github.com/spf13/cobra"
)

Expand Down
14 changes: 7 additions & 7 deletions conform/conform.go → pkg/conform.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"io/ioutil"
"os"

"github.com/autonomy/conform/conform/metadata"
"github.com/autonomy/conform/conform/pipeline"
"github.com/autonomy/conform/conform/policy"
"github.com/autonomy/conform/conform/policy/conventionalcommit"
"github.com/autonomy/conform/conform/script"
"github.com/autonomy/conform/conform/stage"
"github.com/autonomy/conform/conform/task"
"github.com/autonomy/conform/pkg/metadata"
"github.com/autonomy/conform/pkg/pipeline"
"github.com/autonomy/conform/pkg/policy"
"github.com/autonomy/conform/pkg/policy/conventionalcommit"
"github.com/autonomy/conform/pkg/script"
"github.com/autonomy/conform/pkg/stage"
"github.com/autonomy/conform/pkg/task"
"github.com/mitchellh/mapstructure"

yaml "gopkg.in/yaml.v2"
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions conform/metadata/metadata.go → pkg/metadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"time"

"github.com/Masterminds/semver"
"github.com/autonomy/conform/conform/git"
"github.com/autonomy/conform/conform/utilities"
"github.com/autonomy/conform/pkg/git"
"github.com/autonomy/conform/pkg/utilities"
)

// Metadata contains metadata.
Expand Down
6 changes: 3 additions & 3 deletions conform/pipeline/pipeline.go → pkg/pipeline/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"path"
"strings"

"github.com/autonomy/conform/conform/metadata"
"github.com/autonomy/conform/conform/stage"
"github.com/autonomy/conform/conform/task"
"github.com/autonomy/conform/pkg/metadata"
"github.com/autonomy/conform/pkg/stage"
"github.com/autonomy/conform/pkg/task"
)

// Pipeline defines the stages and artifacts.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"regexp"
"strings"

"github.com/autonomy/conform/conform/metadata"
"github.com/autonomy/conform/conform/pipeline"
"github.com/autonomy/conform/conform/policy"
"github.com/autonomy/conform/conform/task"
"github.com/autonomy/conform/pkg/metadata"
"github.com/autonomy/conform/pkg/pipeline"
"github.com/autonomy/conform/pkg/policy"
"github.com/autonomy/conform/pkg/task"
)

// Conventional implements the policy.Policy interface and enforces commit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"os/exec"
"testing"

"github.com/autonomy/conform/conform/git"
"github.com/autonomy/conform/conform/metadata"
"github.com/autonomy/conform/conform/policy"
"github.com/autonomy/conform/pkg/git"
"github.com/autonomy/conform/pkg/metadata"
"github.com/autonomy/conform/pkg/policy"
)

func RemoveAll(dir string) {
Expand Down
6 changes: 3 additions & 3 deletions conform/policy/policy.go → pkg/policy/policy.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package policy

import (
"github.com/autonomy/conform/conform/metadata"
"github.com/autonomy/conform/conform/pipeline"
"github.com/autonomy/conform/conform/task"
"github.com/autonomy/conform/pkg/metadata"
"github.com/autonomy/conform/pkg/pipeline"
"github.com/autonomy/conform/pkg/task"
)

// Option is a functional option used to pass in arguments to a Policy.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion conform/renderer/renderer.go → pkg/renderer/renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"text/template"

"github.com/Masterminds/sprig"
"github.com/autonomy/conform/conform/metadata"
"github.com/autonomy/conform/pkg/metadata"
)

// Renderer renders all pipeline templates.
Expand Down
4 changes: 2 additions & 2 deletions conform/script/script.go → pkg/script/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"os/exec"

"github.com/autonomy/conform/conform/metadata"
"github.com/autonomy/conform/conform/renderer"
"github.com/autonomy/conform/pkg/metadata"
"github.com/autonomy/conform/pkg/renderer"
)

// Script defines a template that can be executed.
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions conform/task/task.go → pkg/task/task.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package task

import (
"github.com/autonomy/conform/conform/metadata"
"github.com/autonomy/conform/conform/renderer"
"github.com/autonomy/conform/pkg/metadata"
"github.com/autonomy/conform/pkg/renderer"
)

// Task defines a stage that can be used within a pipeline.
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit bd3404a

Please sign in to comment.