Skip to content

Commit

Permalink
chore : do not generate sed backup file while generating release info
Browse files Browse the repository at this point in the history
While working on windows, I observed that `make test` always generates
two temporary files after execution:
```
        sed9zmH5g
        sedOFQN7I
```
Their content was similar to release-info.json. On further debugging I
found out they are getting created as backup files for sed replacement
in Makefile.

Signed-off-by: Rohan Kumar <[email protected]>
  • Loading branch information
rohanKanojia authored and praveenkumar committed Dec 31, 2024
1 parent 74d1f1b commit e09b37a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ cross-lint: $(TOOLS_BINDIR)/golangci-lint gen_release_info
.PHONY: gen_release_info
gen_release_info:
@cat release-info.json.sample | sed s/@CRC_VERSION@/$(CRC_VERSION)/ > $(RELEASE_INFO)
@sed -i'' -e s/@GIT_COMMIT_SHA@/$(COMMIT_SHA)/ $(RELEASE_INFO)
@sed -i'' -e s/@OPENSHIFT_VERSION@/$(OPENSHIFT_VERSION)/ $(RELEASE_INFO)
@sed -i"" -e s/@GIT_COMMIT_SHA@/$(COMMIT_SHA)/ $(RELEASE_INFO)
@sed -i"" -e s/@OPENSHIFT_VERSION@/$(OPENSHIFT_VERSION)/ $(RELEASE_INFO)

.PHONY: linux-release-binary macos-release-binary windows-release-binary
linux-release-binary: LDFLAGS+= $(RELEASE_VERSION_VARIABLES)
Expand Down

0 comments on commit e09b37a

Please sign in to comment.