-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (34 loc) · 865 Bytes
/
Copy pathMakefile
File metadata and controls
44 lines (34 loc) · 865 Bytes
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
project = src/Notes
.PHONY: all
all: clean publish
.PHONY: install-npm
install-npm: clean-npm
cd $(project) && npm ci
.PHONY: clean-npm
clean-npm:
cd $(project) && rm -rf node_modules
.PHONY: grunt
grunt:
@if [ -d "$(project)/node_modules" ]; then \
cd $(project) && ./node_modules/.bin/grunt -v; \
else \
echo "'grunt' not installed. Please run 'make install-npm'."; \
fi
.PHONY: restore
restore: clean-project
dotnet restore
.PHONY: build
build: clean-project
dotnet build -c Release
.PHONY: publish
publish: clean-publish clean-project
dotnet publish -c Release /p:Version=1.0.0-$$(git rev-parse --short HEAD) -o publish $(project)
.PHONY: clean-project
clean-project:
cd $(project) && rm -rf bin
cd $(project) && rm -rf obj
.PHONY: clean-publish
clean-publish:
rm -rf publish
.PHONY: clean
clean: clean-publish clean-project clean-npm