-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (30 loc) · 1.22 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
_ := $(shell mkdir -p .make bin)
WORKING_DIR := $(shell pwd)
LOCALBIN := ${WORKING_DIR}/bin
BUN := ${LOCALBIN}/bun
DEVOPS := ${LOCALBIN}/devops
DENO := ${LOCALBIN}/deno
DOTNET := ${LOCALBIN}/dotnet
build: build_dotnet
build_dotnet: .make/dotnet_build
bin/deno: .versions/deno
curl -fsSL https://deno.land/install.sh | DENO_INSTALL='${WORKING_DIR}' DENO_VERSION='v$(shell cat $<)' sh
@touch $@
bin/bun: .versions/bun
curl -fsSL https://bun.sh/install | BUN_INSTALL='${WORKING_DIR}' bash -s 'bun-v$(shell cat $<)'
rm _bun # https://github.com/oven-sh/bun/issues/11179
@touch $@
bin/dotnet-install.sh:
curl -fsSL https://dot.net/v1/dotnet-install.sh > $@ && chmod +x $@
bin/dotnet: global.json | bin/dotnet-install.sh
bin/dotnet-install.sh --install-dir ${LOCALBIN} --jsonfile $< --no-path
bin/devops: .versions/devops
GOBIN=${LOCALBIN} go install github.com/unmango/go/cmd/devops@v$(shell cat $<)
.envrc: hack/example.envrc
cp $< $@
.make/dotnet_build: $(shell $(DEVOPS) list --dotnet) | bin/devops bin/dotnet
$(DOTNET) build
@touch $@
.make/clean_dotnet_install:
rm -rf ${LOCALBIN}/{host,packs,sdk,sdk-manifests,shared,templates}
rm -f ${LOCALBIN}/{LICENSE.txt,ThirdPartyNotices.txt,dotnet-install.sh,dotnet}