fix: Makefile and json log

This commit is contained in:
Markus Pesch 2019-06-11 20:07:55 +02:00
parent c5233d578a
commit 98e5f3a536
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
3 changed files with 14 additions and 4 deletions

View File

@ -2,4 +2,4 @@ services:
- docker
script:
- make docker-build
- make container-build

View File

@ -20,8 +20,18 @@ build:
go build -ldflags "-X main.version=${VERSION}"
chown -R ${UID}:${GID} *
docker-build:
container-build:
docker run \
--volume ${PWD}:/workspace \
volkerraschek/build-image:1.0.0 \
make build UID=${UID} GID=${GID} VERSION=${VERSION} GOOS=${GOOS} GOARCH=${GOARCH}
hades:
$(MAKE) build GOARCH=arm
scp flucky hades.hellenthal.cryptic.systems:/usr/local/bin
ssh hades.hellenthal.cryptic.systems "chmod +x /usr/local/bin/flucky"
poseidon:
$(MAKE) build GOARCH=arm
scp flucky poseidon.trier.cryptic.systems:/usr/local/bin
ssh poseidon.trier.cryptic.systems "chmod +x /usr/local/bin/flucky"

View File

@ -32,8 +32,8 @@ var rootCmd = &cobra.Command{
}
logfiles := make(map[logger.LogValue][]string)
logfiles[logger.LogHumidity] = []string{"/var/log/flucky/humidity.log"}
logfiles[logger.LogTemperature] = []string{"/var/log/flucky/temperature.log"}
logfiles[logger.LogHumidity] = []string{"/var/log/flucky/humidity.json"}
logfiles[logger.LogTemperature] = []string{"/var/log/flucky/temperature.json"}
fc := config.FluckyConfig{
Device: &types.Device{