diff --git a/Makefile b/Makefile index e14562b46e848..388eb44b6f434 100644 --- a/Makefile +++ b/Makefile @@ -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=. \ diff --git a/README.md b/README.md index 9cd8bc09504a3..41fd90fbadc2c 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,13 @@ This repository contains source code for Coder V2. Additional documentation: ## Development +### Pre-requisites + +- `git` +- `go` version 1.17, with the `GOPATH` environment variable set +- `node` +- `yarn` + ### Cloning - `git clone https://github.com/coder/coder` @@ -23,6 +30,9 @@ This repository contains source code for Coder V2. Additional documentation: ### Building - `make build` +- `make install` + +The `coder` CLI binary will now be available at `$GOPATH/bin/coder` ### Development
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: