-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·46 lines (33 loc) · 1.05 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# env variables
# $(if $(wildcard ".env"),,$(shell cp .env.example .env))
# include .env
.DEFAULT_GOAL := up
.PHONY: help
TEST_DEPS := git jq npx
hn=$(shell hostname)
# detect the operating system
OSFLAG :=
ifneq ($(OS),Windows_NT)
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
OSFLAG += LINUX
endif
ifeq ($(UNAME_S),Darwin)
OSFLAG += OSX
endif
endif
WGET := $(shell command -v wget 2> /dev/null)
all:
ifndef WGET
$(error "🥶 wget is not available! Please retry after you install it")
endif
help: ## 🛟 Show this help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-7s\033[0m %s\n", $$1, $$2}'
ncr: ## 📦 Install and setup the server
@wget -q --show-progress https://github.com/forkbombeu/ncr/releases/latest/download/ncr
@chmod +x ./ncr
@echo "📦 Setup is done!"
up: UP_PORT?=3550
up: UP_HOSTNAME?=${hn}
up: ncr ## 🚀 Up & run the project
./ncr -p ${UP_PORT} --hostname ${UP_HOSTNAME} -- --host=0.0.0.0