-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mockgen installation to the script (#6604)
* Add mockgen installation to the script Signed-off-by: Parthvi Vala <[email protected]> * Use go install -mod=readonly instead of installing the binary Signed-off-by: Parthvi Vala <[email protected]> * Add mockgen installation to goget-tools target incase the user wants to run the script individually Signed-off-by: Parthvi Vala <[email protected]> * Update Makefile Co-authored-by: Armel Soro <[email protected]> --------- Signed-off-by: Parthvi Vala <[email protected]> Co-authored-by: Armel Soro <[email protected]> Co-authored-by: Armel Soro <[email protected]>
- Loading branch information
1 parent
26c90d7
commit ef6489c
Showing
2 changed files
with
34 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,97 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Use this script to regererate generated mock files | ||
# Use this script to regenerate generated mock files | ||
# after changing signatures of interfaces in these packages | ||
|
||
mockgen -source=pkg/kclient/interface.go \ | ||
gomockVersion=$(go list -mod=readonly -m -f '{{.Version}}' github.com/golang/mock) | ||
mockgen="go run -mod=readonly github.com/golang/mock/mockgen@$gomockVersion" | ||
|
||
echo Using mockgen "$($mockgen --version)" | ||
|
||
$mockgen -source=pkg/kclient/interface.go \ | ||
-package kclient \ | ||
-destination pkg/kclient/mock_Client.go | ||
|
||
mockgen -source=pkg/storage/storage.go \ | ||
$mockgen -source=pkg/storage/storage.go \ | ||
-package storage \ | ||
-destination pkg/storage/mock_Client.go | ||
|
||
mockgen -source=pkg/devfile/image/image.go \ | ||
$mockgen -source=pkg/devfile/image/image.go \ | ||
-package image \ | ||
-destination pkg/devfile/image/mock_Backend.go | ||
|
||
mockgen -source=pkg/odo/cmdline/cmdline.go \ | ||
$mockgen -source=pkg/odo/cmdline/cmdline.go \ | ||
-package cmdline \ | ||
-destination pkg/odo/cmdline/mock.go | ||
|
||
mockgen -source=pkg/project/project.go \ | ||
$mockgen -source=pkg/project/project.go \ | ||
-package project \ | ||
-destination pkg/project/mock.go | ||
|
||
mockgen -source=pkg/preference/preference.go \ | ||
$mockgen -source=pkg/preference/preference.go \ | ||
-package preference \ | ||
-destination pkg/preference/mock.go | ||
|
||
mockgen -source=pkg/auth/interface.go \ | ||
$mockgen -source=pkg/auth/interface.go \ | ||
-package auth \ | ||
-destination pkg/auth/mock.go | ||
|
||
mockgen -source=pkg/init/backend/interface.go \ | ||
$mockgen -source=pkg/init/backend/interface.go \ | ||
-package backend \ | ||
-destination pkg/init/backend/mock.go | ||
|
||
mockgen -source=pkg/init/asker/interface.go \ | ||
$mockgen -source=pkg/init/asker/interface.go \ | ||
-package asker \ | ||
-destination pkg/init/asker/mock.go | ||
|
||
mockgen -source=pkg/init/interface.go \ | ||
$mockgen -source=pkg/init/interface.go \ | ||
-package init \ | ||
-destination pkg/init/mock.go | ||
|
||
mockgen -source=pkg/registry/interface.go \ | ||
$mockgen -source=pkg/registry/interface.go \ | ||
-package registry \ | ||
-destination pkg/registry/mock.go | ||
|
||
mockgen -source=pkg/deploy/interface.go \ | ||
$mockgen -source=pkg/deploy/interface.go \ | ||
-package deploy \ | ||
-destination pkg/deploy/mock.go | ||
|
||
mockgen -source=pkg/libdevfile/libdevfile.go \ | ||
$mockgen -source=pkg/libdevfile/libdevfile.go \ | ||
-package libdevfile \ | ||
-destination pkg/libdevfile/handler_mock.go | ||
|
||
mockgen -source=pkg/watch/interface.go \ | ||
$mockgen -source=pkg/watch/interface.go \ | ||
-package watch \ | ||
-destination pkg/watch/mock.go | ||
|
||
mockgen -source=pkg/component/delete/interface.go \ | ||
$mockgen -source=pkg/component/delete/interface.go \ | ||
-package delete \ | ||
-destination pkg/component/delete/mock.go | ||
|
||
mockgen -source=pkg/dev/interface.go \ | ||
$mockgen -source=pkg/dev/interface.go \ | ||
-package dev \ | ||
-destination pkg/dev/mock.go | ||
|
||
mockgen -source=pkg/alizer/interface.go \ | ||
$mockgen -source=pkg/alizer/interface.go \ | ||
-package alizer \ | ||
-destination pkg/alizer/mock.go | ||
|
||
mockgen -source=pkg/binding/interface.go \ | ||
$mockgen -source=pkg/binding/interface.go \ | ||
-package binding \ | ||
-destination pkg/binding/mock.go | ||
|
||
mockgen -source=pkg/binding/backend/interface.go \ | ||
$mockgen -source=pkg/binding/backend/interface.go \ | ||
-package backend \ | ||
-destination pkg/binding/backend/mock.go | ||
|
||
mockgen -source=pkg/sync/interface.go \ | ||
$mockgen -source=pkg/sync/interface.go \ | ||
-package sync \ | ||
-destination pkg/sync/mock.go | ||
|
||
mockgen -source=pkg/exec/interface.go \ | ||
$mockgen -source=pkg/exec/interface.go \ | ||
-package exec \ | ||
-destination pkg/exec/mock.go | ||
|
||
mockgen -source=pkg/podman/interface.go \ | ||
$mockgen -source=pkg/podman/interface.go \ | ||
-package podman \ | ||
-destination pkg/podman/mock.go |