-
Notifications
You must be signed in to change notification settings - Fork 425
/
Copy pathMakefile
32 lines (26 loc) · 972 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
GOOS := $(shell go env GOOS)
GOARCH := $(shell go env GOARCH)
SKIP_INSTALL := false
# Platform host
PLATFORM_HOST := localhost:8080
# Build the CLI and Desktop
.PHONY: build
build:
SKIP_INSTALL=$(SKIP_INSTALL) BUILD_PLATFORMS=$(GOOS) BUILD_ARCHS=$(GOARCH) ./hack/rebuild.sh
# Run the desktop app
.PHONY: run-desktop
run-desktop: build
cd desktop && yarn desktop:dev
# Run the daemon against loft host
.PHONY: run-daemon
run-daemon: build
devpod pro daemon start --host $(PLATFORM_HOST)
# Namespace to use for the platform
NAMESPACE := loft
# Copy the devpod binary to the platform pod
.PHONY: cp-to-platform
cp-to-platform:
SKIP_INSTALL=true BUILD_PLATFORMS=linux BUILD_ARCHS=$(GOARCH) ./hack/rebuild.sh
POD=$$(kubectl get pod -n $(NAMESPACE) -l app=loft,release=loft -o jsonpath='{.items[0].metadata.name}'); \
echo "Copying ./test/devpod-linux-$(GOARCH) to pod $$POD"; \
kubectl cp -n $(NAMESPACE) ./test/devpod-linux-$(GOARCH) $$POD:/usr/local/bin/devpod