Skip to content

Commit 0b16731

Browse files
committed
Remove install.sh; add make install target
1 parent 00ca4ce commit 0b16731

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
INSTALL_DIR=$(shell go env GOPATH)/bin
2+
13
bin/coder:
24
mkdir -p bin
35
go build -o bin/coder cmd/coder/main.go
@@ -51,6 +53,12 @@ fmt: fmt/prettier fmt/sql
5153
gen: database/generate peerbroker/proto provisionersdk/proto provisionerd/proto
5254
.PHONY: gen
5355

56+
install:
57+
@echo "--- Copying from bin to $(INSTALL_DIR)"
58+
cp -r ./bin $(INSTALL_DIR)
59+
@echo "-- CLI available at $(INSTALL_DIR)/coder"
60+
.PHONY: install
61+
5462
peerbroker/proto: peerbroker/proto/peerbroker.proto
5563
protoc \
5664
--go_out=. \

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ This repository contains source code for Coder V2. Additional documentation:
1515

1616
## Development
1717

18+
### Pre-requisites
19+
20+
- `git` installed
21+
- `node` and `yarn` installed
22+
- `go` version 1.17, with the `GOPATH` environment variable set
23+
1824
### Cloning
1925

2026
- `git clone https://github.com/coder/coder`
@@ -23,18 +29,16 @@ This repository contains source code for Coder V2. Additional documentation:
2329
### Building
2430

2531
- `make build`
32+
- `make install`
33+
34+
The `coder` CLI binary will now be available at `$GOPATH/bin/coder`
2635

2736
### Development
2837

2938
- `./develop.sh`
3039

3140
The `develop.sh` script runs the server locally on port `3000`, and runs a hot-reload server for front-end code on `8080`.
3241

33-
### CLI
34-
35-
- `./install.sh` will `go install` the `coder` CLI
36-
- `coder --help`
37-
3842
## Front-End Plan
3943

4044
For the front-end team, we're planning on 2 phases to the 'v2' work:

install.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

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:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy