Skip to content

Commit

Permalink
build: Rename 'release' to 'linux-release'
Browse files Browse the repository at this point in the history
We currently only release embedded binaries on linux, and for
Windows/macOS, the binaries would be built with the wrong flags anyway
(they are missing -X '$(REPOPATH)/pkg/crc/version.installerBuild=true').

Renaming the target 'linux-release' should make this clearer. The target
is also changed to only built linux binaries/to only run linting on
linux.

A new 'release' target is added which will call
linux-release/macos-release-binary/windows-release-binary/check to make
it more clear what gets built in this target. It's also needed by our
various CIs
  • Loading branch information
cfergeau authored and praveenkumar committed Feb 23, 2022
1 parent e599e1e commit d1712a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ macos-release-binary: $(BUILD_DIR)/macos-amd64/crc
windows-release-binary: LDFLAGS+= -X '$(REPOPATH)/pkg/crc/version.installerBuild=true' $(RELEASE_VERSION_VARIABLES)
windows-release-binary: $(BUILD_DIR)/windows-amd64/crc.exe

.PHONY: release
release: LDFLAGS += -X '$(REPOPATH)/pkg/crc/version.linuxReleaseBuild=true' $(RELEASE_VERSION_VARIABLES)
release: clean cross-lint embed_crc_helpers gen_release_info
.PHONY: release linux-release
release: clean linux-release macos-release-binary windows-release-binary check
linux-release: clean lint linux-release-binary embed_crc_helpers gen_release_info
mkdir $(RELEASE_DIR)

@mkdir -p $(BUILD_DIR)/crc-linux-$(CRC_VERSION)-amd64
Expand All @@ -278,7 +278,7 @@ release: clean cross-lint embed_crc_helpers gen_release_info
cd $(RELEASE_DIR) && sha256sum * > sha256sum.txt

.PHONY: embed_crc_helpers
embed_crc_helpers: cross $(HOST_BUILD_DIR)/crc-embedder
embed_crc_helpers: $(BUILD_DIR)/linux-amd64/crc $(HOST_BUILD_DIR)/crc-embedder
$(HOST_BUILD_DIR)/crc-embedder embed --log-level debug --goos=linux $(BUILD_DIR)/linux-amd64/crc

.PHONY: update-go-version
Expand Down

0 comments on commit d1712a9

Please sign in to comment.