Skip to content

Commit

Permalink
* switch to alpine 3.10
Browse files Browse the repository at this point in the history
* switch to go 1.13
* update gomavlib
  • Loading branch information
aler9 committed Dec 14, 2019
1 parent d6c75b2 commit 59df95a
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 40 deletions.
17 changes: 5 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
language: go
language: minimal

go:
- 1.12.x

env:
- GO111MODULE=on

before_install:
- sudo apt-get install -y zip
- go mod download
services:
- docker

script:
- make release-nodocker
- make release

deploy:
provider: releases
Expand All @@ -21,5 +14,5 @@ deploy:
file_glob: true
file: release/*
on:
repo: gswly/mavp2p
repo: aler9/mavp2p
tags: true
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 gswly
Copyright (c) 2019 aler9

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
37 changes: 21 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

.PHONY: $(shell ls)

BASE_IMAGE = amd64/golang:1.12-stretch
BASE_IMAGE = amd64/golang:1.13-alpine3.10

help:
@echo "usage: make [action] [args...]"
Expand All @@ -15,25 +15,30 @@ help:
@echo ""

mod-tidy:
docker run --rm -it -v $(PWD):/src $(BASE_IMAGE) \
sh -c "cd /src && go get -m ./... && go mod tidy"
docker run --rm -it -v $(PWD):/s $(BASE_IMAGE) \
sh -c "cd /s && go get && go mod tidy"

format:
@docker run --rm -it -v $(PWD):/src $(BASE_IMAGE) \
sh -c "cd /src \
@docker run --rm -it -v $(PWD):/s $(BASE_IMAGE) \
sh -c "cd /s \
&& find . -type f -name '*.go' | xargs gofmt -l -w -s"

define DOCKERFILE_RELEASE
FROM $(BASE_IMAGE)
RUN apk add --no-cache zip make git tar
WORKDIR /s
COPY go.mod go.sum ./
RUN go mod download
COPY .git ./.git
COPY *.go Makefile ./
RUN make release-nodocker
endef
export DOCKERFILE_RELEASE

release:
echo "FROM $(BASE_IMAGE) \n\
RUN apt-get update && apt-get install -y zip \n\
WORKDIR /src \n\
COPY go.mod go.sum ./ \n\
RUN go mod download \n\
COPY .git ./.git \n\
COPY *.go Makefile ./ \n\
RUN make release-nodocker" | docker build . -f - -t mavp2p-release \
echo "$$DOCKERFILE_RELEASE" | docker build . -f - -t mavp2p-release \
&& docker run --rm -it -v $(PWD):/out \
mavp2p-release sh -c "rm -rf /out/release && cp -r /src/release /out/"
mavp2p-release sh -c "rm -rf /out/release && cp -r /s/release /out/"

release-nodocker:
$(eval VERSION := $(shell git describe --tags))
Expand All @@ -60,7 +65,7 @@ travis-setup:
RUN apk add --no-cache build-base git \n\
RUN gem install travis" | docker build - -t mavp2p-travis-sr \
&& docker run --rm -it \
-v $(PWD):/src \
-v $(PWD):/s \
mavp2p-travis-sr \
sh -c "cd /src \
sh -c "cd /s \
&& travis setup releases"
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

# mavp2p

[![Go Report Card](https://goreportcard.com/badge/github.com/gswly/mavp2p)](https://goreportcard.com/report/github.com/gswly/mavp2p)
[![Build Status](https://travis-ci.org/gswly/mavp2p.svg?branch=master)](https://travis-ci.org/gswly/mavp2p)
[![Go Report Card](https://goreportcard.com/badge/github.com/aler9/mavp2p)](https://goreportcard.com/report/github.com/aler9/mavp2p)
[![Build Status](https://travis-ci.org/aler9/mavp2p.svg?branch=master)](https://travis-ci.org/aler9/mavp2p)

_mavp2p_ is a flexible and efficient Mavlink proxy / bridge / router, implemented in the form of a command-line utility. It is used primarily for linking UAV flight controllers, connected through a serial port, with ground stations on a network, but can be used to build any kind of routing involving serial, TCP and UDP, allowing communication across different physical layers or transport layers.

_mavp2p_ can replace _mavproxy_ in systems with limited resources (for instance companion computers), and _mavlink-router_ when more flexibility is needed.

This project makes use of the [**gomavlib**](https://github.com/gswly/gomavlib) library, a full-featured Mavlink library.
This project makes use of the [**gomavlib**](https://github.com/aler9/gomavlib) library, a full-featured Mavlink library.

## Features

Expand Down Expand Up @@ -39,7 +39,7 @@ Advantages with respect to _mavlink-router_:

## Installation

Precompiled binaries are available in the [release](https://github.com/gswly/mavp2p/releases) page.
Precompiled binaries are available in the [release](https://github.com/aler9/mavp2p/releases) page.

## Usage

Expand Down
6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module mavp2p

require (
github.com/gswly/gomavlib v0.0.0-20190528112113-9d8d212916e3
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
github.com/aler9/gomavlib v0.0.0-20191214183340-7ef85c972f00
gopkg.in/alecthomas/kingpin.v2 v2.2.6
)

go 1.13
16 changes: 14 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
bou.ke/monkey v1.0.2 h1:kWcnsrCNUatbxncxR/ThdYqbytgOIArtYWqcQLQzKLI=
bou.ke/monkey v1.0.2/go.mod h1:OqickVX3tNx6t33n1xvtTtu85YN5s6cKwVug+oHMaIA=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/aler9/gomavlib v0.0.0-20191214183340-7ef85c972f00 h1:m8Cv/lSuqoU9CNq/AKYuVoJvkF0TmTOCwNngnoezik0=
github.com/aler9/gomavlib v0.0.0-20191214183340-7ef85c972f00/go.mod h1:zVDnk00REBXaBGeztlQy0cjcxDn2A2BQ8I7u4ntmD5s=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gswly/gomavlib v0.0.0-20190528112113-9d8d212916e3 h1:i/nAwxYxbViEUWusEuBKhP/m1LzZIIHGKym/dSSQaYY=
github.com/gswly/gomavlib v0.0.0-20190528112113-9d8d212916e3/go.mod h1:1xQWxU9I/Y19PPQg8rJh+Wxk0TC1qvZR3btjKYH5WC4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07 h1:UyzmZLoiDWMRywV4DUYb9Fbt8uiOSooupjTq10vpvnU=
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
golang.org/x/sys v0.0.0-20190310054646-10058d7d4faa h1:lqti/xP+yD/6zH5TqEwx2MilNIJY5Vbc6Qr8J3qyPIQ=
golang.org/x/sys v0.0.0-20190310054646-10058d7d4faa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
2 changes: 1 addition & 1 deletion handle_error.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/gswly/gomavlib"
"github.com/aler9/gomavlib"
"log"
"sync"
"time"
Expand Down
2 changes: 1 addition & 1 deletion handle_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"fmt"
"github.com/gswly/gomavlib"
"github.com/aler9/gomavlib"
"log"
"sync"
"time"
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package main

import (
"fmt"
"github.com/gswly/gomavlib"
"github.com/gswly/gomavlib/dialects/common"
"github.com/aler9/gomavlib"
"github.com/aler9/gomavlib/dialects/common"
"gopkg.in/alecthomas/kingpin.v2"
"io/ioutil"
"log"
Expand Down

0 comments on commit 59df95a

Please sign in to comment.