make target and docs (#1002)

* make target and docs

* fix grammar
This commit is contained in:
marpio
2018-12-18 14:56:31 +01:00
committed by Manu Gupta
parent 81547dd19e
commit aee30a4209
3 changed files with 40 additions and 2 deletions
+5
View File
@@ -1,7 +1,12 @@
VERSION = "unset"
DATE=$(shell date -u +%Y-%m-%d-%H:%M:%S-%Z)
.PHONY: build
build:
cd cmd/proxy && buffalo build
build-ver:
GO111MODULE=on CGO_ENABLED=0 go build -mod=vendor -ldflags "-X github.com/gomods/athens/pkg/build.version=$(VERSION) -X github.com/gomods/athens/pkg/build.buildDate=$(DATE)" -o athens ./cmd/proxy
.PHONY: run
run: build
./athens
+1 -2
View File
@@ -26,7 +26,6 @@ We strongly recommend using a tagged release, e.g. `gomods/athens:v0.2.0`, inste
To make sure it's easy to install, we try to provide as many ways as possible to install and run Athens:
- It's written in Go, so we provide a self-contained binary. You can configure and run the binary on your machine(s)
- Instructions on how to run directly from the binary are coming soon
- It's written in Go, so you can easily build it yourself on almost any platform. You can also build the binary providing your own version and build time. See [here](./build-from-source)
- We provide a [Docker image](https://hub.docker.com/r/gomods/athens/) and [instructions on how to run it](./shared-team-instance)
- We provide [Kubernetes](https://kubernetes.io) [Helm Charts](https://helm.sh) with [instructions on how to run Athens on Kubernetes](./install-on-kubernetes)
+34
View File
@@ -0,0 +1,34 @@
---
title: Building a versioned Athens binary from source
description: Building a versioned Athens binary from source
weight: 1
---
You can do that easily with just few commands:
**Bash**
```bash
git clone https://github.com/gomods/athens
cd athens
make build-ver VERSION="0.2.0"
```
**PowerShell**
```PowerShell
git clone https://github.com/gomods/athens
cd athens
$env:GO111MODULE="on"
$version = "0.2.0"
$date = (Get-Date).ToUniversalTime()
go build -mod=vendor -ldflags "-X github.com/gomods/athens/pkg/build.version=$version -X github.com/gomods/athens/pkg/build.buildDate=$date" -o athens ./cmd/proxy
```
This will give you a binary named `athens`. You can print the version and time information by running:
```console
./athens -version
```
which should return something like:
```console
Build Details:
Version: 0.2.0
Date: 2018-12-13-20:51:06-UTC
```