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