diff --git a/.circleci/config.yml b/.circleci/config.yml index 1a4e6f1a4..089006055 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -143,9 +143,11 @@ jobs: echo 'export GO111MODULE=on' >> $BASH_ENV source $BASH_ENV - checkout - - run: go get -u github.com/mitchellh/gox github.com/tcnksm/ghr + - run: GO111MODULE=off go get -u github.com/mitchellh/gox github.com/tcnksm/ghr github.com/gobuffalo/packr/packr + - run: packr - run: | gox -parallel=2 -ldflags "-X github.com/ory/keto/cmd.Version=`git describe --tags` -X github.com/ory/keto/cmd.BuildTime=`TZ=UTC date -u '+%Y-%m-%dT%H:%M:%SZ'` -X github.com/ory/keto/cmd.GitHash=`git rev-parse HEAD`" -output "dist/{{.Dir}}-{{.OS}}-{{.Arch}}"; + - run: packr clean - run: ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace `git describe --tags` dist/ workflows: diff --git a/Dockerfile b/Dockerfile index 680f1d814..2f91f63d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN apk add --no-cache git build-base WORKDIR /go/src/github.com/ory/keto -RUN go get -u github.com/gobuffalo/packr/packr +RUN GO111MODULE=off go get -u github.com/gobuffalo/packr/packr ENV GO111MODULE=on diff --git a/Dockerfile-alpine b/Dockerfile-alpine index 0169b345a..a139eb326 100644 --- a/Dockerfile-alpine +++ b/Dockerfile-alpine @@ -7,11 +7,10 @@ RUN apk add --no-cache git build-base WORKDIR /go/src/github.com/ory/keto -RUN go get -u github.com/gobuffalo/packr/packr +RUN GO111MODULE=off go get -u github.com/gobuffalo/packr/packr RUN export GO111MODULE=on - ADD go.mod go.mod ADD go.sum go.sum diff --git a/Makefile b/Makefile index fb6b21267..4374b8dbf 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,9 @@ init: - go get -u \ + GO111MODULE=off go get -u \ github.com/ory/x/tools/listx \ github.com/sqs/goreturns \ - github.com/go-swagger/go-swagger/cmd/swagger + github.com/go-swagger/go-swagger/cmd/swagger \ + github.com/gobuffalo/packr/packr format: goreturns -w -local github.com/ory $$(listx .) @@ -33,10 +34,14 @@ build-sdk: install-stable: KETO_LATEST=$$(git describe --abbrev=0 --tags) git checkout $$KETO_LATEST + $(go env GOPATH)/bin/packr GO111MODULE=on go install \ -ldflags "-X github.com/ory/keto/cmd.Version=$$KETO_LATEST -X github.com/ory/keto/cmd.BuildTime=`TZ=UTC date -u '+%Y-%m-%dT%H:%M:%SZ'` -X github.com/ory/keto/cmd.GitHash=`git rev-parse HEAD`" \ . + $(go env GOPATH)/bin/packr clean git checkout master install: + $(go env GOPATH)/bin/packr GO111MODULE=on go install . + $(go env GOPATH)/bin/packr clean diff --git a/cmd/server/.gitignore b/cmd/server/.gitignore new file mode 100644 index 000000000..34aa176d1 --- /dev/null +++ b/cmd/server/.gitignore @@ -0,0 +1 @@ +*-packr.go \ No newline at end of file