Skip to content

Commit b9a345d

Browse files
anjannathpraveenkumar
authored andcommitted
fix gomod2rpmdeps installation
'make spec' currently fails with the following error: ``` pushd /tmp && GO111MODULE=on go get github.com/cfergeau/gomod2rpmdeps/cmd/gomod2rpmdeps && popd /tmp ~/work/crc go: go.mod file not found in current directory or any parent directory. 'go get' is no longer supported outside a module. To build and install a command, use 'go install' with a version, like 'go install example.com/cmd@latest' For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'. make: *** [/Users/anjan/go/bin/gomod2rpmdeps] Error 1 ```
1 parent e725168 commit b9a345d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,11 @@ $(BUILD_DIR)/macos-universal/crc-macos-installer.tar: packagedir
343343
tar -cvf $@ ./packaging
344344
cd $(@D) && sha256sum $(@F)>$(@F).sha256sum
345345

346-
$(GOPATH)/bin/gomod2rpmdeps:
347-
pushd /tmp && GO111MODULE=on go get github.com/cfergeau/gomod2rpmdeps/cmd/gomod2rpmdeps && popd
346+
$(TOOLS_BINDIR)/gomod2rpmdeps:
347+
GOBIN=$(TOOLS_BINDIR) go install -mod=mod github.com/cfergeau/gomod2rpmdeps/cmd/gomod2rpmdeps@latest
348348

349-
%.spec: %.spec.in $(GOPATH)/bin/gomod2rpmdeps
350-
@$(GOPATH)/bin/gomod2rpmdeps | sed -e '/__BUNDLED_PROVIDES__/r /dev/stdin' \
349+
%.spec: %.spec.in $(TOOLS_BINDIR)/gomod2rpmdeps
350+
@$(TOOLS_BINDIR)/gomod2rpmdeps | sed -e '/__BUNDLED_PROVIDES__/r /dev/stdin' \
351351
-e '/__BUNDLED_PROVIDES__/d' \
352352
-e 's/__VERSION__/'$(CRC_VERSION)'/g' \
353353
-e 's/__OPENSHIFT_VERSION__/'$(OPENSHIFT_VERSION)'/g' \

tools/bin/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
golangci-lint
22
golangci-lint.exe
3+
gomod2rpmdeps

0 commit comments

Comments
 (0)