From f219b9678279c2bf1bfd0f69331039ae9bf408f6 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 25 Aug 2022 14:39:58 +0200 Subject: [PATCH] Migration: From github.com to git.webz.asia --- .travis.yml | 18 +++++++++--------- README.md | 10 +++++----- cmd/gorm-goose/cmd_create.go | 2 +- cmd/gorm-goose/cmd_dbversion.go | 2 +- cmd/gorm-goose/cmd_down.go | 2 +- cmd/gorm-goose/cmd_redo.go | 2 +- cmd/gorm-goose/cmd_status.go | 2 +- cmd/gorm-goose/cmd_up.go | 2 +- cmd/gorm-goose/main.go | 4 ++-- go.mod | 10 +++++----- go.sum | 5 +++++ lib/gorm-goose/migration_go.go | 2 +- 12 files changed, 33 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index fe416e2..dd960b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,19 +28,19 @@ jobs: script: - go get -t -v ./... - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w - -X 'github.com/go-migration/gorm-goose/version.BuildVersion=`git tag|tail -n1`' - -X 'github.com/go-migration/gorm-goose/version.BuildHash=`git rev-parse HEAD`' - -X 'github.com/go-migration/gorm-goose/version.BuildTime=`date`'" + -X 'git.webz.asia/go-migration/gorm-goose/version.BuildVersion=`git tag|tail -n1`' + -X 'git.webz.asia/go-migration/gorm-goose/version.BuildHash=`git rev-parse HEAD`' + -X 'git.webz.asia/go-migration/gorm-goose/version.BuildTime=`date`'" -o ./gorm-goose-x64.linux ./cmd/gorm-goose/ - CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w - -X 'github.com/go-migration/gorm-goose/version.BuildVersion=`git tag|tail -n1`' - -X 'github.com/go-migration/gorm-goose/version.BuildHash=`git rev-parse HEAD`' - -X 'github.com/go-migration/gorm-goose/version.BuildTime=`date`'" + -X 'git.webz.asia/go-migration/gorm-goose/version.BuildVersion=`git tag|tail -n1`' + -X 'git.webz.asia/go-migration/gorm-goose/version.BuildHash=`git rev-parse HEAD`' + -X 'git.webz.asia/go-migration/gorm-goose/version.BuildTime=`date`'" -o ./gorm-goose-x64.macos ./cmd/gorm-goose/ - CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w - -X 'github.com/go-migration/gorm-goose/version.BuildVersion=`git tag|tail -n1`' - -X 'github.com/go-migration/gorm-goose/version.BuildHash=`git rev-parse HEAD`' - -X 'github.com/go-migration/gorm-goose/version.BuildTime=`date`'" + -X 'git.webz.asia/go-migration/gorm-goose/version.BuildVersion=`git tag|tail -n1`' + -X 'git.webz.asia/go-migration/gorm-goose/version.BuildHash=`git rev-parse HEAD`' + -X 'git.webz.asia/go-migration/gorm-goose/version.BuildTime=`date`'" -o ./gorm-goose-x64.exe ./cmd/gorm-goose/ deploy: provider: releases diff --git a/README.md b/README.md index 329a4d1..4a45895 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![Go Report Card](https://goreportcard.com/badge/github.com/go-migration/gorm-goose)](https://goreportcard.com/report/github.com/go-migration/gorm-goose) -[![Actions Status](https://github.com/go-migration/gorm-goose/workflows/Go/badge.svg)](https://github.com/go-migration/gorm-goose/actions) +[![Go Report Card](https://goreportcard.com/badge/git.webz.asia/go-migration/gorm-goose)](https://goreportcard.com/report/git.webz.asia/go-migration/gorm-goose) +[![Actions Status](https://git.webz.asia/go-migration/gorm-goose/workflows/Go/badge.svg)](https://git.webz.asia/go-migration/gorm-goose/actions) [![Build Status](https://travis-ci.org/go-migration/gorm-goose.svg?branch=master)](https://travis-ci.org/go-migration/gorm-goose) [![codecov](https://codecov.io/gh/go-migration/gorm-goose/branch/master/graph/badge.svg)](https://codecov.io/gh/go-migration/gorm-goose) @@ -14,11 +14,11 @@ You can manage your database's evolution by creating incremental SQL or Go scrip ## Install - $ go get github.com/go-migration/gorm-goose/cmd/gorm-goose + $ go get git.webz.asia/go-migration/gorm-goose/cmd/gorm-goose This will install the `gorm-goose` binary to your `$GOPATH/bin` directory. -You can also build gorm-goose into your own applications by importing `github.com/go-migration/gorm-goose/lib/gorm-goose`. +You can also build gorm-goose into your own applications by importing `git.webz.asia/go-migration/gorm-goose/lib/gorm-goose`. ## Usage @@ -215,7 +215,7 @@ These instructions assume that you're using [Keith Rarick's Heroku Go buildpack] // note: need at least one blank line after build constraint package main -import _ "github.com/go-migration/gorm-goose/cmd/gorm-goose" +import _ "git.webz.asia/go-migration/gorm-goose/cmd/gorm-goose" ``` [Set up your Heroku database(s) as usual.](https://devcenter.heroku.com/articles/heroku-postgresql) diff --git a/cmd/gorm-goose/cmd_create.go b/cmd/gorm-goose/cmd_create.go index aeb8417..15b8a8d 100644 --- a/cmd/gorm-goose/cmd_create.go +++ b/cmd/gorm-goose/cmd_create.go @@ -28,7 +28,7 @@ import ( "path/filepath" "time" - goose "github.com/go-migration/gorm-goose/lib/gorm-goose" + goose "git.webz.asia/go-migration/gorm-goose/lib/gorm-goose" ) var createCmd = &Command{ diff --git a/cmd/gorm-goose/cmd_dbversion.go b/cmd/gorm-goose/cmd_dbversion.go index 4598619..88bf1e1 100644 --- a/cmd/gorm-goose/cmd_dbversion.go +++ b/cmd/gorm-goose/cmd_dbversion.go @@ -25,7 +25,7 @@ import ( "fmt" "log" - goose "github.com/go-migration/gorm-goose/lib/gorm-goose" + goose "git.webz.asia/go-migration/gorm-goose/lib/gorm-goose" ) var dbVersionCmd = &Command{ diff --git a/cmd/gorm-goose/cmd_down.go b/cmd/gorm-goose/cmd_down.go index c0e365d..494c4b5 100644 --- a/cmd/gorm-goose/cmd_down.go +++ b/cmd/gorm-goose/cmd_down.go @@ -24,7 +24,7 @@ package main import ( "log" - goose "github.com/go-migration/gorm-goose/lib/gorm-goose" + goose "git.webz.asia/go-migration/gorm-goose/lib/gorm-goose" ) var downCmd = &Command{ diff --git a/cmd/gorm-goose/cmd_redo.go b/cmd/gorm-goose/cmd_redo.go index fa7cf2a..7b217b5 100644 --- a/cmd/gorm-goose/cmd_redo.go +++ b/cmd/gorm-goose/cmd_redo.go @@ -24,7 +24,7 @@ package main import ( "log" - goose "github.com/go-migration/gorm-goose/lib/gorm-goose" + goose "git.webz.asia/go-migration/gorm-goose/lib/gorm-goose" ) var redoCmd = &Command{ diff --git a/cmd/gorm-goose/cmd_status.go b/cmd/gorm-goose/cmd_status.go index 35111cc..ff0ea0c 100644 --- a/cmd/gorm-goose/cmd_status.go +++ b/cmd/gorm-goose/cmd_status.go @@ -27,7 +27,7 @@ import ( "path/filepath" "time" - goose "github.com/go-migration/gorm-goose/lib/gorm-goose" + goose "git.webz.asia/go-migration/gorm-goose/lib/gorm-goose" "github.com/jinzhu/gorm" ) diff --git a/cmd/gorm-goose/cmd_up.go b/cmd/gorm-goose/cmd_up.go index ce1f43f..b26c89f 100644 --- a/cmd/gorm-goose/cmd_up.go +++ b/cmd/gorm-goose/cmd_up.go @@ -24,7 +24,7 @@ package main import ( "log" - goose "github.com/go-migration/gorm-goose/lib/gorm-goose" + goose "git.webz.asia/go-migration/gorm-goose/lib/gorm-goose" ) var upCmd = &Command{ diff --git a/cmd/gorm-goose/main.go b/cmd/gorm-goose/main.go index 395fe37..aa69538 100644 --- a/cmd/gorm-goose/main.go +++ b/cmd/gorm-goose/main.go @@ -28,8 +28,8 @@ import ( "strings" "text/template" - goose "github.com/go-migration/gorm-goose/lib/gorm-goose" - "github.com/go-migration/gorm-goose/version" + goose "git.webz.asia/go-migration/gorm-goose/lib/gorm-goose" + "git.webz.asia/go-migration/gorm-goose/version" ) // global options. available to any subcommands. diff --git a/go.mod b/go.mod index c428d1e..3309963 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ -module github.com/go-migration/gorm-goose +module git.webz.asia/go-migration/gorm-goose - go 1.13 +go 1.13 - require ( - github.com/jinzhu/gorm v1.9.12 - github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28 +require ( + github.com/jinzhu/gorm v1.9.12 + github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28 ) diff --git a/go.sum b/go.sum index c50e101..e2892e4 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,17 @@ +github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd h1:83Wprp6ROGeiHFAP8WJdI2RoxALQYgdllERc3N5N2DM= github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 h1:Yzb9+7DPaBjB8zlTR87/ElzFsnQfuHnVUVqpZZIcV5Y= github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/jinzhu/gorm v1.9.12 h1:Drgk1clyWT9t9ERbzHza6Mj/8FY/CqMyVzOiHviMo6Q= github.com/jinzhu/gorm v1.9.12/go.mod h1:vhTjlKSJUTWNtcbQtrMBFCxy7eXTzeCAzfL5fBZT/Qs= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.0.1 h1:HjfetcXq097iXP0uoPCdnM4Efp5/9MsM0/M+XOTeR3M= github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28 h1:mkl3tvPHIuPaWsLtmHTybJeoVEW7cbePK73Ir8VtruA= github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28/go.mod h1:T/T7jsxVqf9k/zYOqbgNAsANsjxTd1Yq3htjDhQ1H0c= @@ -17,6 +21,7 @@ github.com/mattn/go-sqlite3 v2.0.1+incompatible h1:xQ15muvnzGBHpIpdrNi1DA5x0+TcB github.com/mattn/go-sqlite3 v2.0.1+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd h1:GGJVjV8waZKRHrgwvtH66z9ZGVurTD1MT0n1Bb+q4aM= golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= diff --git a/lib/gorm-goose/migration_go.go b/lib/gorm-goose/migration_go.go index 1f962c5..ce89b5a 100644 --- a/lib/gorm-goose/migration_go.go +++ b/lib/gorm-goose/migration_go.go @@ -118,7 +118,7 @@ import ( "encoding/gob" _ "{{.Import}}" - goose "github.com/go-migration/gorm-goose/lib/gorm-goose" + goose "git.webz.asia/go-migration/gorm-goose/lib/gorm-goose" ) func main() {