-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (30 loc) · 933 Bytes
/
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
#
# FRC 1721 Tidal Force
# 2023-2024
#
ROOT := $(PWD)
STAGEDIR := $(ROOT)/dist/
DASH_HASH := $(shell git describe --tags --always)
all: help
help: # List all commands and their descriptions
@echo
@cat Makefile | grep ': #' --color=never | sed '/^\t/d' | sed 's/: / /' | column -t -s '#'
@echo
ready: # Run the necessary commands for development
pipenv install
npm ci
build: # Run `parcel build' and inject NetworkTables
npm run build
./build.sh
run: # Run a live server of the dashboard
cd dist && pipenv run python -m pynetworktables2js
dev: # Automatically run `make build' whenever a file changes in src/ (requires program `entr')
find src/ | entr sh -c 'make build'
clean: # Run `git clean -fdX
git clean -fdX
stage: # Prepares dist/ for deployment
rm -rf dist/
make build
cp entrypoint.sh $(STAGEDIR)
cp run.bat $(STAGEDIR)
find dist/ -type f -exec sed -i 's/%baked_ver%/${shell git describe --always}/g' {} +