fix: readme
This commit is contained in:
parent
5c80c014bf
commit
d3c4ca2c72
5
.travis.yml
Normal file
5
.travis.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
services:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
script:
|
||||||
|
- make docker-build
|
42
Makefile
42
Makefile
@ -6,28 +6,34 @@ UID?=$(shell id -u)
|
|||||||
GID?=$(shell id -g)
|
GID?=$(shell id -g)
|
||||||
|
|
||||||
# VERSION
|
# VERSION
|
||||||
|
# UID/GID
|
||||||
|
# UID or GID is the UNIX user ID or group ID of the user who executes
|
||||||
|
# make. If the UID or GID is not passed as a make variable, an attempt
|
||||||
|
# is made to determine it.
|
||||||
|
UID?=$(shell id -u)
|
||||||
|
GID?=$(shell id -g)
|
||||||
|
|
||||||
# If no version is specified as a parameter of make, the last git hash
|
# If no version is specified as a parameter of make, the last git hash
|
||||||
# value is taken.
|
# value is taken.
|
||||||
VERSION ?= "$(shell git rev-parse --short HEAD)-git"
|
VERSION:=$(or ${TRAVIS_TAG}, ${TRAVIS_TAG}, $(shell git rev-parse --short HEAD)-git)
|
||||||
|
|
||||||
# PHONY
|
GOARCH?=amd64
|
||||||
# A phony target is one that is not really the name of a file; rather it
|
GOOS?=linux
|
||||||
# is just a name for a recipe to be executed when you make an explicit
|
|
||||||
# request.
|
|
||||||
.PHONY: flucky flucky-amd64 flucky-arm
|
|
||||||
|
|
||||||
# default build
|
# default build
|
||||||
flucky: flucky-amd64
|
build:
|
||||||
|
GOOS=${GOOS} \
|
||||||
|
GOARCH=${GOARCH} \
|
||||||
|
go build -ldflags "-X main.version=${VERSION}"
|
||||||
|
|
||||||
# build flucky for amd64 architecture
|
docker-build:
|
||||||
flucky-amd64:
|
docker run \
|
||||||
GOOS=linux \
|
--volume ${PWD}:/workspace \
|
||||||
GOARCH=amd64 \
|
volkerraschek/build-image:1.0.0 \
|
||||||
go build -o flucky-amd64 -ldflags "-X main.version=${VERSION}"
|
make build VERSION=${VERSION} GOOS=${GOOS} GOARCH=${GOARCH}
|
||||||
|
|
||||||
# build flucky for arm architecture
|
docker-sanitized:
|
||||||
flucky-arm:
|
docker run \
|
||||||
GOOS=linux \
|
--volume ${PWD}:/workspace \
|
||||||
GOARCH=arm \
|
volkerraschek/build-image:1.0.0 \
|
||||||
GOARM=7 \
|
chown ${UID}:${GID} -R /workspace
|
||||||
go build -o fctl-arm -ldflags "-X main.version=${VERSION}"
|
|
16
README.md
16
README.md
@ -1 +1,15 @@
|
|||||||
# go-flucky
|
# flucky [![Build Status](https://travis-ci.com/volker-raschek/flucky.svg?branch=master)](https://travis-ci.com/volker-raschek/flucky)
|
||||||
|
Flucky is a lightweight program written in go for reading data from sensors with a raspberry pi.
|
||||||
|
|
||||||
|
## Compiling
|
||||||
|
Flucky can be compiled directly with go.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ go get -u github.com/volker-raschek/flucky
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively you can checkout this repository and compile it with make for your architecture. For examample for a raspberry pi with arm architecture.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ make build
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user