Skip to content

Commit

Permalink
1. added workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
iasergunin committed Dec 15, 2023
1 parent f14f261 commit 8b57256
Show file tree
Hide file tree
Showing 16 changed files with 42 additions and 27 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ go.mod.tidy:

go.mod.vendor:
cd sh && sh ./go.mod.vendor.sh

go.work.sync:
cd sh && sh ./go.work.sync.sh
1 change: 0 additions & 1 deletion drivers/go-redis-v8/go.work
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ go 1.21
use .

replace github.com/avito-tech/go-transaction-manager/v2 => ../../

3 changes: 2 additions & 1 deletion drivers/gorm/go.work
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ go 1.21
use .

replace github.com/avito-tech/go-transaction-manager/v2 => ../../
replace github.com/avito-tech/go-transaction-manager/drivers/sql/v2 => ../sql

replace github.com/avito-tech/go-transaction-manager/drivers/sql/v2 => ../sql
3 changes: 0 additions & 3 deletions drivers/mongo/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@ require (
go.mongodb.org/mongo-driver v1.13.1
)

replace github.com/avito-tech/go-transaction-manager/drivers/sql/v2 v2.0.0 => ../sql

replace github.com/avito-tech/go-transaction-manager/v2 v2.0.0 => ../../
2 changes: 1 addition & 1 deletion drivers/mongo/go.work
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ go 1.21
use .

replace github.com/avito-tech/go-transaction-manager/v2 => ../../
replace github.com/avito-tech/go-transaction-manager/drivers/sql/v2 => ../sql

replace github.com/avito-tech/go-transaction-manager/drivers/sql/v2 => ../sql
2 changes: 0 additions & 2 deletions drivers/pgxv4/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@ require (
github.com/pashagolub/pgxmock v1.8.0
github.com/stretchr/testify v1.8.2
)

replace github.com/avito-tech/go-transaction-manager/v2 v2.0.0 => ../../
1 change: 0 additions & 1 deletion drivers/pgxv4/go.work
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ go 1.21
use .

replace github.com/avito-tech/go-transaction-manager/v2 => ../../

1 change: 0 additions & 1 deletion drivers/pgxv5/go.work
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ go 1.21
use .

replace github.com/avito-tech/go-transaction-manager/v2 => ../../

1 change: 1 addition & 0 deletions drivers/sql/go.work.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
4 changes: 0 additions & 4 deletions drivers/sqlx/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,3 @@ require (
github.com/stretchr/testify v1.8.2
go.uber.org/multierr v1.9.0
)

replace github.com/avito-tech/go-transaction-manager/v2 v2.0.0 => ../../

replace github.com/avito-tech/go-transaction-manager/drivers/sql/v2 v2.0.0 => ../sql
2 changes: 1 addition & 1 deletion drivers/sqlx/go.work
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ go 1.21
use .

replace github.com/avito-tech/go-transaction-manager/v2 => ../../
replace github.com/avito-tech/go-transaction-manager/drivers/sql/v2 => ../sql

replace github.com/avito-tech/go-transaction-manager/drivers/sql/v2 => ../sql
1 change: 1 addition & 0 deletions drivers/sqlx/go.work.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ require (
go.uber.org/multierr v1.9.0
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
)

11 changes: 7 additions & 4 deletions sh/go.mod.tidy.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
#!/bin/bash

DIR=$(pwd)
drivers=$($DIR/utils/drivers.sh)

cd ../

ROOT=$(pwd)

go mod tidy

drivers=$($DIR/utils/drivers.sh)
go mod tidy &

for driver in $drivers; do
if [ -d "$driver" ]; then
echo "\n$driver"
cd $driver && go mod tidy
cd $driver && go mod tidy &

cd $ROOT
fi
done

wait
14 changes: 7 additions & 7 deletions sh/go.mod.vendor.local.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#!/bin/bash

DIR=$(pwd)
drivers=$($DIR/utils/drivers.sh)

cd ../

ROOT=$(pwd)

go mod vendor

drivers=$($DIR/utils/drivers.sh)
go mod vendor &

for driver in $drivers; do
if [ -d "$driver" ]; then
echo "\n$driver"

cd $driver && \
$ROOT/sh/utils/go.mod.replace.default.sh
go mod vendor && \
$ROOT/sh/utils/go.mod.dropreplace.default.sh
cd $driver && go mod vendor &

cd $ROOT
fi
done

wait
19 changes: 19 additions & 0 deletions sh/go.work.sync.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

DIR=$(pwd)
drivers=$($DIR/utils/drivers.sh)

cd ../

ROOT=$(pwd)

for driver in $drivers; do
if [ -d "$driver" ]; then
echo "\n$driver"
cd $driver && go work sync &

cd $ROOT
fi
done

wait

0 comments on commit 8b57256

Please sign in to comment.