mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
refactor: Add install script for coder CLI (#243)
This adds a `make install` target that copies the CLI and other coder binaries to `$GOPATH/bin` Intended to be helpful for developers who aren't familiar with `go` or the directory structure, in running `coder` CLI locally.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
INSTALL_DIR=$(shell go env GOPATH)/bin
|
||||
|
||||
bin/coder:
|
||||
mkdir -p bin
|
||||
go build -o bin/coder cmd/coder/main.go
|
||||
@@ -51,6 +53,12 @@ fmt: fmt/prettier fmt/sql
|
||||
gen: database/generate peerbroker/proto provisionersdk/proto provisionerd/proto
|
||||
.PHONY: gen
|
||||
|
||||
install:
|
||||
@echo "--- Copying from bin to $(INSTALL_DIR)"
|
||||
cp -r ./bin $(INSTALL_DIR)
|
||||
@echo "-- CLI available at $(shell ls $(INSTALL_DIR)/coder*)"
|
||||
.PHONY: install
|
||||
|
||||
peerbroker/proto: peerbroker/proto/peerbroker.proto
|
||||
protoc \
|
||||
--go_out=. \
|
||||
|
||||
Reference in New Issue
Block a user