Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(Makefile): detect and default to make go-install on darwin vs install everywhere else #3197

Merged
merged 4 commits into from
Mar 13, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 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,17 @@ deps:

## install: Install all build binaries into the $PREFIX (/usr/local/ by default) directory.
ramin marked this conversation as resolved.
Show resolved Hide resolved
install:
ifeq ($(OS),Darwin)
@$(MAKE) go-install
else
@$(MAKE) install-global
endif
.PHONY: install

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
Loading