-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
49 lines (37 loc) · 966 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Define environment variables
TEMPL_DIR := src/template
DOTENV := .env.prod
TEST_PROJ_OUT := "experiments/Rule"
include $(DOTENV)
export $(shell sed 's/=.*//' $(DOTENV))
.PHONY: remove create create_release install new run-dotnet run all list info deploy
all: uninstall clean remove pack install new
clean:
cd experiments && \
rm -rf *
install:
dotnet new install ./
uninstall:
dotnet new uninstall ./
remove:
cd $(TEMPL_DIR)/nupkg && \
pwd && \
dotnet new --uninstall $$TEMPL_NAME && \
rm -rf *
pack:
cd $(TEMPL_DIR) && \
dotnet pack
pack-release:
cd $(TEMPL_DIR) && \
dotnet pack --configuration Release
new:
rm -rf $(TEST_PROJ_OUT)
dotnet new $(TEMPL_DOTNET_NAME) -o $(TEST_PROJ_OUT)
run-dotnet:
cd $(TEST_PROJ_OUT) && \
dotnet run
info:
dotnet new $$TEMPL_DOTNET_NAME -h
deploy: remove pack-release
cd $(TEMPL_DIR)/nupkg && \
dotnet nuget push $(NUGET_FILE) --api-key $(NUGET_API_KEY) --source https://api.nuget.org/v3/index.json