Skip to content

Commit

Permalink
fix gomod2rpmdeps installation
Browse files Browse the repository at this point in the history
'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
```
  • Loading branch information
anjannath authored and praveenkumar committed Jul 18, 2022
1 parent e725168 commit b9a345d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,11 @@ $(BUILD_DIR)/macos-universal/crc-macos-installer.tar: packagedir
tar -cvf $@ ./packaging
cd $(@D) && sha256sum $(@F)>$(@F).sha256sum

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

%.spec: %.spec.in $(GOPATH)/bin/gomod2rpmdeps
@$(GOPATH)/bin/gomod2rpmdeps | sed -e '/__BUNDLED_PROVIDES__/r /dev/stdin' \
%.spec: %.spec.in $(TOOLS_BINDIR)/gomod2rpmdeps
@$(TOOLS_BINDIR)/gomod2rpmdeps | sed -e '/__BUNDLED_PROVIDES__/r /dev/stdin' \
-e '/__BUNDLED_PROVIDES__/d' \
-e 's/__VERSION__/'$(CRC_VERSION)'/g' \
-e 's/__OPENSHIFT_VERSION__/'$(OPENSHIFT_VERSION)'/g' \
Expand Down
1 change: 1 addition & 0 deletions tools/bin/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
golangci-lint
golangci-lint.exe
gomod2rpmdeps

0 comments on commit b9a345d

Please sign in to comment.