# Generated by go2rpm 1.16.0.post0 %bcond check 1 # https://github.com/vektra/mockery %global goipath github.com/vektra/mockery/v3 %global forgeurl https://github.com/vektra/mockery Version: 3.5.0 %gometa -L -f %global common_description %{expand: A mock code autogenerator for Go.} Name: mockery Release: %autorelease Summary: A mock code autogenerator for Go # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND GPL-3.0-only AND ISC AND MIT AND MPL-2.0 AND Unlicense URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml BuildRequires: go-vendor-tools %description %{common_description} %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build # set GO111MODULE to on via gomodulesmode which is # used by gobuild and gotest %global gomodulesmode GO111MODULE=on %gobuild -o %{gobuilddir}/bin/mockery %{goipath} %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %check %go_vendor_license_check -c %{S:2} %if %{with check} # end to end tests - mocks not needed. # see test.ci in source Taskfile.yml %gotest ./e2e/... # generate mocks see test.ci in source Taskfile.yml MOCKERY_CONFIG=./.mockery_testify.yml go run . MOCKERY_CONFIG=./.mockery_matryer.yml go run . # needed for gotest to work with vendored modules # %%define gomodulesmode GO111MODULE=on # run unit tests see test in source Taskfile.yml %gotest ./internal/... ./template_funcs/... ./template/... %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc CODE_OF_CONDUCT.md CONTRIBUTING.md README.md %{_bindir}/mockery %changelog %autochangelog