Skip to content

Commit

Permalink
Updated formatting in building.md
Browse files Browse the repository at this point in the history
  • Loading branch information
s0nerik committed Feb 15, 2021
1 parent ba289d2 commit 996dc65
Showing 1 changed file with 41 additions and 25 deletions.
66 changes: 41 additions & 25 deletions docs/building.md
@@ -1,40 +1,54 @@
# How To Build from source

## macOS

1. Install [Go](https://golang.org/) via [brew](https://brew.sh/)
````

```bash
$ brew install go
$ go version
go version go1.10.2 darwin/amd64
````
2. Install Go cross compilation tool - [gox](https://github.com/mitchellh/gox) via [brew](https://brew.sh/)
````
```

1. Install Go cross compilation tool - [gox](https://github.com/mitchellh/gox) via [brew](https://brew.sh/)

```bash
$ brew install gox
$ brew info gox
gox: stable 0.4.0 (bottled)
````
3. Check [GOPATH](https://golang.org/cmd/go/#hdr-GOPATH_environment_variable)
````
```

1. Check [GOPATH](https://golang.org/cmd/go/#hdr-GOPATH_environment_variable)

```bash
$ printenv GOPATH
/Users/<user>/go
````
4. If [GOPATH](https://golang.org/cmd/go/#hdr-GOPATH_environment_variable) not defined, add it to bash profile
````
```

1. If [GOPATH](https://golang.org/cmd/go/#hdr-GOPATH_environment_variable) not defined, add it to bash profile

```bash
$ echo 'export GOPATH="$HOME/go"' >> ~/.bash_profile
$ source ~/.bash_profile
$ printenv GOPATH
/Users/<user>/go
````
4. Get goloc package
````
$ go get github.com/s0nerik/goloc
````
5. Move to package folder
````
$ cd <GOPATH>/src/github.com/s0nerik/goloc
````
6. Run build script and wait
````
```

1. Get goloc package

```bash
go get github.com/s0nerik/goloc
```

1. Move to package folder

```bash
cd <GOPATH>/src/github.com/s0nerik/goloc
```

1. Run build script and wait

```bash
$ sh build.sh
Number of parallel builds: 3
--> windows/amd64: github.com/s0nerik/goloc
Expand All @@ -43,12 +57,14 @@ Number of parallel builds: 3
adding: darwin_amd64 (deflated 68%)
adding: linux_amd64 (deflated 68%)
adding: windows_amd64.exe (deflated 68%)
````
7. Move to output folder and unzip binary
````
```

1. Move to output folder and unzip binary

```bash
$ cd out
$ unzip goloc.zip
inflating: darwin_amd64
inflating: linux_amd64
inflating: windows_amd64.exe
````
```

0 comments on commit 996dc65

Please sign in to comment.