diff --git a/build b/build index 0493c3e1..564232fa 100755 --- a/build +++ b/build @@ -3,22 +3,6 @@ export GOPATH=${PWD}/Godeps/_workspace export GOBIN=${PWD}/bin -if command -v go-bindata &>/dev/null; then - DEX_MIGRATE_FROM_DISK=${DEX_MIGRATE_FROM_DISK:=false} - - echo "Turning migrations into ./db/migrations/assets.go" - if [ "$DEX_MIGRATE_FROM_DISK" = true ]; then - echo "Compiling migrations.go: will read migrations from disk." - else - echo "Compiling migrations into migrations.go" - fi - go-bindata -debug=$DEX_MIGRATE_FROM_DISK -modtime=1 -pkg migrations -o ./db/migrations/assets.go ./db/migrations - gofmt -w ./db/migrations/assets.go -else - echo "Could not find go-bindata in path, will not generate migrations" - echo "Install go-bindata with: go get -u github.com/jteeuwen/go-bindata/..." -fi - rm -rf $GOPATH/src/github.com/coreos/dex mkdir -p $GOPATH/src/github.com/coreos/ diff --git a/db/migrations/migrations.go b/db/migrations/migrations.go new file mode 100644 index 00000000..b9a50e71 --- /dev/null +++ b/db/migrations/migrations.go @@ -0,0 +1,6 @@ +package migrations + +// To download go-bindata run `go get -u github.com/jteeuwen/go-bindata/...` + +//go:generate go-bindata -modtime=1 -pkg migrations -o assets.go ../ +//go:generate gofmt -w assets.go