CircleCI 2 & Releases (#9)

This commit is contained in:
Charlie Revett 2018-02-01 10:54:23 -08:00 committed by GitHub
parent 0032efcc3b
commit dd94086a22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 126 additions and 37 deletions

View file

@ -1,8 +1,23 @@
BRANCH = "master"
VERSION = $(shell cat ./VERSION)
build:
@go build -o ./bin/neo-go ./cli/main.go
check-version:
git fetch && (! git rev-list ${VERSION})
deps:
@glide install
push-tag:
git checkout ${BRANCH}
git pull origin ${BRANCH}
git tag ${VERSION}
git push origin ${BRANCH} --tags
test:
@go test $(glide nv) -cover
@go test $(shell glide nv) -cover
vet:
@go vet $(shell glide nv)

1
VERSION Normal file
View file

@ -0,0 +1 @@
0.1.0

86
circle.yml Normal file
View file

@ -0,0 +1,86 @@
version: 2
jobs:
install_deps:
working_directory: /go/src/github.com/CityOfZion/neo-go
docker:
- image: vidsyhq/go-builder:latest
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run: BUILD=false /scripts/build.sh
- save_cache:
key: dependency-cache-{{ .Revision }}
paths:
- vendor
test:
working_directory: /go/src/github.com/CityOfZion/neo-go
docker:
- image: vidsyhq/go-builder:latest
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run: make test
vet:
working_directory: /go/src/github.com/CityOfZion/neo-go
docker:
- image: vidsyhq/go-builder:latest
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run: make vet
check_version:
working_directory: /go/src/github.com/CityOfZion/neo-go
docker:
- image: vidsyhq/go-builder:latest
steps:
- checkout
- run: make check-version
build_cli:
working_directory: /go/src/github.com/CityOfZion/neo-go
docker:
- image: vidsyhq/go-builder:latest
steps:
- checkout
- run: make build
workflows:
version: 2
workflow:
jobs:
- install_deps:
filters:
tags:
only: /[0-9]+\.[0-9]+\.[0-9]+/
branches:
ignore: master
- test:
requires:
- install_deps
filters:
tags:
only: /[0-9]+\.[0-9]+\.[0-9]+/
branches:
ignore: master
- vet:
requires:
- install_deps
filters:
tags:
only: /[0-9]+\.[0-9]+\.[0-9]+/
branches:
ignore: master
- check_version:
filters:
branches:
ignore: master
- build_cli:
requires:
- install_deps
filters:
tags:
only: /[0-9]+\.[0-9]+\.[0-9]+/
branches:
ignore: master

View file

@ -4,7 +4,7 @@ import (
"flag"
"strings"
"github.com/anthdm/neo-go/pkg/network"
"github.com/CityOfZion/neo-go/pkg/network"
)
var (

13
glide.lock generated
View file

@ -1,11 +1,4 @@
hash: 054e4119c1d6deac9c76a3f6ecc319c80d2099d6dd4fd804b03ce47a9b1ccc86
updated: 2018-02-01T17:18:00.958758Z
imports:
- name: github.com/anthdm/neo-go
version: 3b91a4808e67c54687a4ba90ac4caf584398cea4
subpackages:
- pkg/core
- pkg/network
- pkg/network/payload
- pkg/util
hash: b1152abdd9a1fa1e70773cddcf54247d3fe3332602604f9f2233165ced02eeaf
updated: 2018-02-01T18:34:22.684905Z
imports: []
testImports: []

View file

@ -1,8 +1,2 @@
package: github.com/CityOfZion/neo-go
import:
- package: github.com/anthdm/neo-go
subpackages:
- pkg/core
- pkg/network
- pkg/network/payload
- pkg/util
import: []

View file

@ -4,7 +4,7 @@ import (
"encoding/binary"
"io"
. "github.com/anthdm/neo-go/pkg/util"
. "github.com/CityOfZion/neo-go/pkg/util"
)
// Block represents one block in the chain.

View file

@ -8,8 +8,8 @@ import (
"fmt"
"io"
"github.com/anthdm/neo-go/pkg/core"
"github.com/anthdm/neo-go/pkg/network/payload"
"github.com/CityOfZion/neo-go/pkg/core"
"github.com/CityOfZion/neo-go/pkg/network/payload"
)
const (

View file

@ -5,7 +5,7 @@ import (
"reflect"
"testing"
"github.com/anthdm/neo-go/pkg/network/payload"
"github.com/CityOfZion/neo-go/pkg/network/payload"
)
func TestMessageEncodeDecode(t *testing.T) {

View file

@ -4,7 +4,7 @@ import (
"encoding/binary"
"io"
"github.com/anthdm/neo-go/pkg/util"
"github.com/CityOfZion/neo-go/pkg/util"
)
// AddrWithTime payload

View file

@ -6,7 +6,7 @@ import (
"reflect"
"testing"
"github.com/anthdm/neo-go/pkg/util"
"github.com/CityOfZion/neo-go/pkg/util"
)
func TestEncodeDecodeAddr(t *testing.T) {

View file

@ -4,7 +4,7 @@ import (
"encoding/binary"
"io"
. "github.com/anthdm/neo-go/pkg/util"
. "github.com/CityOfZion/neo-go/pkg/util"
)
// HashStartStop contains fields and methods to be shared with the

View file

@ -6,7 +6,7 @@ import (
"reflect"
"testing"
. "github.com/anthdm/neo-go/pkg/util"
. "github.com/CityOfZion/neo-go/pkg/util"
)
func TestGetBlocksEncodeDecode(t *testing.T) {

View file

@ -1,6 +1,6 @@
package payload
import "github.com/anthdm/neo-go/pkg/util"
import "github.com/CityOfZion/neo-go/pkg/util"
// GetHeaders payload is the same as the "GetBlocks" payload.
type GetHeaders struct {

View file

@ -6,7 +6,7 @@ import (
"reflect"
"testing"
"github.com/anthdm/neo-go/pkg/util"
"github.com/CityOfZion/neo-go/pkg/util"
)
func TestGetHeadersEncodeDecode(t *testing.T) {

View file

@ -4,7 +4,7 @@ import (
"encoding/binary"
"io"
. "github.com/anthdm/neo-go/pkg/util"
. "github.com/CityOfZion/neo-go/pkg/util"
)
// The node can broadcast the object information it owns by this message.

View file

@ -6,7 +6,7 @@ import (
"reflect"
"testing"
. "github.com/anthdm/neo-go/pkg/util"
. "github.com/CityOfZion/neo-go/pkg/util"
)
func TestInventoryEncodeDecode(t *testing.T) {

View file

@ -1,7 +1,7 @@
package network
import (
"github.com/anthdm/neo-go/pkg/util"
"github.com/CityOfZion/neo-go/pkg/util"
)
// Peer is the local representation of a remote node. It's an interface that may

View file

@ -7,8 +7,8 @@ import (
"os"
"time"
"github.com/anthdm/neo-go/pkg/network/payload"
"github.com/anthdm/neo-go/pkg/util"
"github.com/CityOfZion/neo-go/pkg/network/payload"
"github.com/CityOfZion/neo-go/pkg/util"
)
const (

View file

@ -3,7 +3,7 @@ package network
import (
"testing"
"github.com/anthdm/neo-go/pkg/network/payload"
"github.com/CityOfZion/neo-go/pkg/network/payload"
)
func TestHandleVersion(t *testing.T) {

View file

@ -5,8 +5,8 @@ import (
"fmt"
"net"
"github.com/anthdm/neo-go/pkg/network/payload"
"github.com/anthdm/neo-go/pkg/util"
"github.com/CityOfZion/neo-go/pkg/network/payload"
"github.com/CityOfZion/neo-go/pkg/util"
)
func listenTCP(s *Server, port int) error {