Skip to content

Commit b7b4925

Browse files
committed
Added instructions for local go install
1 parent 613837c commit b7b4925

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
# septa
22
Septa command line for getting the next to arrive.
33

4-
To build the command, clone this repo, then type `make`. The septa executable will be copied to `$HOME/bin`. Prerequisite is that you have `docker` installed, and `$HOME/bin` is on your `$PATH`
4+
## Build
5+
To build the command, clone this repo, then type `make`. The septa executable will be copied to `$HOME/bin`. Prerequisite is that you have `docker` installed, and `$HOME/bin` is on your `$PATH`.
6+
7+
git clone https://github.com/dherbst/septa
8+
cd septa
9+
make
510

611
You can create a bash alias to make looking up the next to arrive for your favorite stations:
712

813
alias nta="septa next Narberth \"Suburban Station\""
914

10-
Alternatively, you can use the `go install` command, if you clone this repo to your implied `GOPATH`.
15+
Alternatively, you can use the `go install` command which should install the `septa` binary to `$HOME/go/bin`:
1116

17+
git clone https://github.com/dherbst/septa
18+
cd septa
19+
make install-local
1220

1321
## Commands
1422

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ go 1.14
55
require (
66
github.com/securego/gosec v0.0.0-20200302134848-c998389da2ac // indirect
77
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
8-
golang.org/x/tools v0.0.0-20200305224536-de023d59a5d1 // indirect
8+
golang.org/x/tools v0.0.0-20200306191617-51e69f71924f // indirect
99
)

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapK
5353
golang.org/x/tools v0.0.0-20200228224639-71482053b885/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
5454
golang.org/x/tools v0.0.0-20200305224536-de023d59a5d1 h1:A6Mu2vcvuNXbBiGKuVHG74fmEPmzsZ5dzG0WhV2GcqI=
5555
golang.org/x/tools v0.0.0-20200305224536-de023d59a5d1/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
56+
golang.org/x/tools v0.0.0-20200306191617-51e69f71924f h1:bFIWQKTZ5vXyr7xMDvzbWUj5Y/WBE4a4sf35MAyZjx0=
57+
golang.org/x/tools v0.0.0-20200306191617-51e69f71924f/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
5658
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
5759
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
5860
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,14 @@ LDFLAGS := "-X github.com/dherbst/septa.GitHash=${GIT_HASH}"
99
all: clean pull lint sec test build install
1010

1111
clean:
12-
rm -rf vendor/
1312
mkdir -p bin
1413
rm -f bin/septa || true
1514

16-
get:
17-
mkdir -p vendor
18-
1915
pull:
2016
docker pull ${GOLANG}
2117

2218
lint:
23-
docker run -i --rm -v ${PWD}:/go/src/github.com/dherbst/septa -w /go/src/github.com/dherbst/septa ${GOLANG} make lint-in-container
19+
docker run -i --rm -v ${PWD}:/go/src/github.com/dherbst/septa -w /go/src/github.com/dherbst/septa ${GOLANG} make lint-in-container
2420

2521
lint-in-container:
2622
go get -u golang.org/x/lint/golint
@@ -51,5 +47,8 @@ install:
5147
mkdir -p ~/bin
5248
cp bin/septa ~/bin/septa
5349

50+
install-local:
51+
go install -ldflags ${LDFLAGS} github.com/dherbst/septa/cmd/septa
52+
5453
image: build
5554
docker build -t septa:latest .

0 commit comments

Comments
 (0)