Skip to content

Commit e5326c2

Browse files
committed
Update openshift/api verify scripts to tolerate existing replace statements
1 parent 651caa0 commit e5326c2

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

ci-operator/config/openshift/api/openshift-api-master.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ tests:
9090
cp -Rf ./ $dir/api/
9191
rm -rf $dir/api/vendor
9292
cd $dir
93-
echo "replace github.com/openshift/api => ./api" >> go.mod
93+
go mod edit -dropreplace github.com/openshift/api
94+
go mod edit -replace github.com/openshift/api=./api
9495
echo "# github.com/openshift/api => ./api" >> vendor/modules.txt
9596
sed -i "/github.com\/openshift\/api v0.0.0/ s/$/ => \.\/api/" vendor/modules.txt
9697
go mod vendor
@@ -113,8 +114,10 @@ tests:
113114
rm -rf $dir/openshift-api/vendor
114115
rm -rf $dir/openshift-client-go/vendor
115116
cd $dir
116-
echo "replace github.com/openshift/api => ./openshift-api" >> go.mod
117-
echo "replace github.com/openshift/client-go => ./openshift-client-go" >> go.mod
117+
go mod edit -dropreplace github.com/openshift/api
118+
go mod edit -dropreplace github.com/openshift/client-go
119+
go mod edit -replace github.com/openshift/api=./openshift-api
120+
go mod edit -replace github.com/openshift/client-go=./openshift-client-go
118121
echo "# github.com/openshift/api => ./openshift-api" >> vendor/modules.txt
119122
echo "# github.com/openshift/client-go => ./openshift-client-go" >> vendor/modules.txt
120123
sed -i "/github.com\/openshift\/api v0.0.0/ s/$/ => \.\/openshift-api/" vendor/modules.txt

0 commit comments

Comments
 (0)