Skip to content

Commit

Permalink
detect and default to make go-install on darwin vs the linux way in a…
Browse files Browse the repository at this point in the history
…ll other cases for refs #3169
  • Loading branch information
ramin committed Feb 20, 2024
1 parent 5e1895c commit 0f6beb7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ SHELL=/usr/bin/env bash
PROJECTNAME=$(shell basename "$(PWD)")
DIR_FULLPATH=$(shell pwd)
versioningPath := "github.com/celestiaorg/celestia-node/nodebuilder/node"
OS := $(shell uname -s)
LDFLAGS=-ldflags="-X '$(versioningPath).buildTime=$(shell date)' -X '$(versioningPath).lastCommit=$(shell git rev-parse HEAD)' -X '$(versioningPath).semanticVersion=$(shell git describe --tags --dirty=-dev 2>/dev/null || git rev-parse --abbrev-ref HEAD)'"
TAGS=integration
SHORT=
Expand Down Expand Up @@ -65,9 +66,20 @@ deps:

## install: Install all build binaries into the $PREFIX (/usr/local/ by default) directory.
install:
@$(MAKE) detect-install
.PHONY: install

detect-install:
ifeq ($(OS),Darwin)
@$(MAKE) go-install
else
@$(MAKE) install-global
endif

install-global:
@echo "--> Installing Celestia"
@install -v ./build/* -t ${PREFIX}/bin/
.PHONY: install
.PHONY: install-global

## go-install: Build and install the celestia-node binary into the GOBIN directory.
go-install:
Expand Down

0 comments on commit 0f6beb7

Please sign in to comment.