Skip to content

Commit

Permalink
constants: Remove IsRelease/linuxReleaseBuild
Browse files Browse the repository at this point in the history
IsRelease() is no longer used in the codebase, so it can be removed.
This in turn makes linuxReleaseBuild unused.
  • Loading branch information
cfergeau authored and praveenkumar committed Sep 20, 2022
1 parent 0bd8952 commit 27cd148
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ gen_release_info:
@sed -i s/@PODMAN_VERSION@/$(PODMAN_VERSION)/ $(RELEASE_INFO)

.PHONY: linux-release-binary macos-release-binary windows-release-binary
linux-release-binary: LDFLAGS += -X '$(REPOPATH)/pkg/crc/version.linuxReleaseBuild=true' $(RELEASE_VERSION_VARIABLES)
linux-release-binary: $(BUILD_DIR)/linux-amd64/crc

macos-release-binary: LDFLAGS+= -X '$(REPOPATH)/pkg/crc/version.installerBuild=true' $(RELEASE_VERSION_VARIABLES)
Expand Down
4 changes: 0 additions & 4 deletions pkg/crc/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,6 @@ func EnsureBaseDirectoriesExist() error {
return nil
}

func IsRelease() bool {
return version.IsInstaller() || version.IsLinuxRelease()
}

func GetPublicKeyPath() string {
return filepath.Join(MachineInstanceDir, DefaultName, "id_ecdsa.pub")
}
Expand Down
9 changes: 0 additions & 9 deletions pkg/crc/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ var (
// will be true for releases on macos and windows
// will be false for git builds on macos and windows
installerBuild = "false"

// will always false on macos and windows
// will be true for release on linux
// will be false for git builds on linux
linuxReleaseBuild = "false"
)

const (
Expand Down Expand Up @@ -89,10 +84,6 @@ func IsInstaller() bool {
return installerBuild != "false"
}

func IsLinuxRelease() bool {
return linuxReleaseBuild != "false"
}

func InstallPath() string {
if !IsInstaller() {
logging.Errorf("version.InstallPath() should not be called on non-installer builds")
Expand Down

0 comments on commit 27cd148

Please sign in to comment.