Adding .gitlab-ci.yml file. Commenting unused code to be able to build the binary in CI.

This commit is contained in:
Alexey Skobkin 2019-10-03 01:13:42 +03:00
parent 6d139c9a16
commit 914d692b3a
No known key found for this signature in database
GPG key ID: 5D5CEF6F221278E7
2 changed files with 15 additions and 7 deletions

9
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,9 @@
image: "go:1"
build:
script:
- go build .
- ./magnetico-go-migrator --help
artifacts:
paths:
- magnetico-go-migrator

View file

@ -4,7 +4,6 @@ import (
"database/sql" "database/sql"
"fmt" "fmt"
"github.com/boramalper/magnetico/pkg/persistence" "github.com/boramalper/magnetico/pkg/persistence"
"github.com/cheggaaa/pb/v3"
_ "github.com/mattn/go-sqlite3" _ "github.com/mattn/go-sqlite3"
"go.uber.org/zap" "go.uber.org/zap"
"gopkg.in/alecthomas/kingpin.v2" "gopkg.in/alecthomas/kingpin.v2"
@ -47,12 +46,12 @@ func main() {
} }
func process(pyDb sql.DB, goDb persistence.Database) error { func process(pyDb sql.DB, goDb persistence.Database) error {
torrentsTotal, err := getNumberOfTorrents(pyDb) //torrentsTotal, err := getNumberOfTorrents(pyDb)
if err != nil { //if err != nil {
zap.L().Panic("Couldn't count torrents", zap.Error(err)) // zap.L().Panic("Couldn't count torrents", zap.Error(err))
} //}
//
bar := pb.StartNew(int(torrentsTotal)) //bar := pb.StartNew(int(torrentsTotal))
// TODO // TODO