Skip to content

Commit

Permalink
Use shared GitContext proto message
Browse files Browse the repository at this point in the history
  • Loading branch information
lustefaniak committed Oct 9, 2024
1 parent 0921118 commit 760886b
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 2,279 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
GOOS=darwin CGO_ENABLED=0 GOARCH=arm64 go build -o synq-sqlmesh-arm64-darwin main.go
GOOS=darwin CGO_ENABLED=0 GOARCH=amd64 go build -o synq-sqlmesh-amd64-darwin main.go
GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o synq-sqlmesh-amd64-linux main.go
GOOS=windows CGO_ENABLED=0 GOARCH=amd64 go build -o synq-sqlmesh-amd64-windows.exe main.go
GOOS=linux CGO_ENABLED=0 GOARCH=arm64 go build -o synq-sqlmesh-arm64-linux main.go
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
Expand All @@ -32,7 +32,7 @@ jobs:
synq-sqlmesh-arm64-darwin
synq-sqlmesh-amd64-darwin
synq-sqlmesh-amd64-linux
synq-sqlmesh-amd64-windows.exe
synq-sqlmesh-arm64-linux
name: release synq-dbt
"on":
push:
Expand Down
6 changes: 3 additions & 3 deletions git/git.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
package git

import (
ingestsqlmeshv1 "buf.build/gen/go/getsynq/api/protocolbuffers/go/synq/ingest/sqlmesh/v1"
ingestgitv1 "buf.build/gen/go/getsynq/api/protocolbuffers/go/synq/ingest/git/v1"
"context"
"os/exec"
"strings"
"time"
)

func CollectGitContext(ctx context.Context, dir string) *ingestsqlmeshv1.GitContext {
func CollectGitContext(ctx context.Context, dir string) *ingestgitv1.GitContext {
if !commandExists("git") {
return nil
}

return &ingestsqlmeshv1.GitContext{
return &ingestgitv1.GitContext{
CloneUrl: getCloneUrl(ctx, dir),
Branch: getCurrentBranch(ctx, dir),
CommitSha: getCommitSHA(ctx, dir),
Expand Down
33 changes: 17 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
module github.com/getsynq/synq-sqlmesh

go 1.21
go 1.22.0

toolchain go1.23.1

require (
buf.build/gen/go/getsynq/api/grpc/go v1.4.0-20240618221816-2eaa79a347e1.1
buf.build/gen/go/getsynq/api/protocolbuffers/go v1.34.2-20240618221816-2eaa79a347e1.2
buf.build/gen/go/getsynq/api/grpc/go v1.5.1-20241009130006-b2ed3af4a469.1
buf.build/gen/go/getsynq/api/protocolbuffers/go v1.35.1-20241009130006-b2ed3af4a469.1
github.com/djherbis/times v1.6.0
github.com/samber/lo v1.39.0
github.com/samber/lo v1.47.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.1
github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816
github.com/valyala/fasthttp v1.55.0
golang.org/x/oauth2 v0.21.0
google.golang.org/grpc v1.64.0
google.golang.org/protobuf v1.34.2
github.com/valyala/fasthttp v1.56.0
golang.org/x/oauth2 v0.23.0
google.golang.org/grpc v1.67.1
google.golang.org/protobuf v1.35.1
)

require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240508200655-46a4cf4ba109.2 // indirect
cloud.google.com/go/compute/metadata v0.3.0 // indirect
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.1-20240920164238-5a7b106cbb87.1 // indirect
cloud.google.com/go/compute/metadata v0.5.2 // indirect
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/compress v1.17.10 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect
)
Loading

0 comments on commit 760886b

Please sign in to comment.