-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (48 loc) · 1.46 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
SHELL = /usr/bin/env bash -o nounset -o pipefail -o errexit -c
ifneq ("$(wildcard .env)","")
include .env
export
endif
APP_NAME = l3miage
## help: Display list of commands
.PHONY: help
help: Makefile
@sed -n 's|^##||p' $< | column -t -s ':' | sort
## name: Output name of app
.PHONY: name
name:
@echo -n $(APP_NAME)
## version: Output last commit sha in short version
.PHONY: version
version:
@printf "$(shell git rev-parse --short HEAD)"
## version-full: Output last commit sha
.PHONY: version-full
version-full:
@printf "$(shell git rev-parse HEAD)"
## version-date: Output last commit date
.PHONY: version-date
version-date:
@printf "$(shell git log -n 1 "--date=format:%Y%m%d%H%M" "--pretty=format:%cd")"
## init: Bootstrap your application. e.g. fetch some data files, make some API calls, request user input etc.
.PHONY: init
init:
@curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/main/bootstrap.sh" | bash -s -- "-c" "git_hooks"
npm install --ignore-scripts
## build: Build the application.
.PHONY: build
build:
npm run reveal
npm run build
## run: Locally run the application, e.g. node index.js, python -m myapp, go run myapp etc ...
.PHONY: run
run:
npm start
## run-airgap: Locally run the application, e.g. node index.js, python -m myapp, go run myapp etc ...
.PHONY: run-airgap
run-airgap:
npm run start-airgap
## config: Create local configuration
.PHONY: config
config:
@cp .env.example .env