Skip to content

Commit

Permalink
Release v0.11.0 (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
revett committed Oct 27, 2018
1 parent f3ae979 commit c7ede47
Show file tree
Hide file tree
Showing 11 changed files with 175 additions and 40 deletions.
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in the repo.
* @revett
48 changes: 28 additions & 20 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
---
name: Bug report
about: Create a report to help us improve

name: Bug Report
about: Highlight a problem with the project
---

**Describe the bug**
A clear and concise description of what the bug is.
## Summary

A clear and concise description of what the bug is...

## To Reproduce

Describle how to reproduce the behavior of the bug:

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
1. Click on '...'
1. Scroll down to '...'
1. See error

## Expected Behaviour

A clear and concise description of what you expected to happen...

## Docker

Which version...

## Docker Compose

Which version...

**Expected behavior**
A clear and concise description of what you expected to happen.
## Operating System

**Screenshots**
If applicable, add screenshots to help explain your problem.
Are you running Mac, Windows or Linux...

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
## Screenshots

**Additional context**
Add any other context about the problem here.
If applicable, add screenshots to help explain your problem.
20 changes: 10 additions & 10 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Feature request
name: Feature Request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
## Describe the Solution

A clear and concise description of what you want to happen...

## Why?

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
Make the contributors of this project understand why this is an important
feature for them to implement...

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
## Additional Context

**Additional context**
Add any other context or screenshots about the feature request here.
Add any other context or screenshots about the feature request here...
7 changes: 4 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

...

## Notes
## Checklist

- [ ] Remember to bump the `VERSION` file using [semver](https://semver.org/) 📝
- [ ] Make sure the CI tests pass on your branch 👍
- [ ] I have ran the tests locally.
- [ ] I branched off of the `develop` branch and not `master`.
- [ ] I did not change the `VERSION` file.
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<h1 align="center">
Contributing to neo-local
</h1>

<p align="center">
First off, thanks for taking the time to contribute! 🎉👍
</p>

<p align="center">
The following is a set of guidelines for contributing to <b>neo-local</b>. Please use
your best judgement when following them, and feel free to propose changes to this
document in a pull request.
</p>

## Git Flow

This project follows the [Git Flow](https://jeffkreeftmeijer.com/git-flow/)
branching workflow for managing features, hotfixes and releases.

Please have a read first of Jeff Kreeftmeijer
[blog post](https://jeffkreeftmeijer.com/git-flow/) which does a great job of
describing it.

After cloning the repo locally, create a new feature branch:

```
git checkout -b feat/my-awesome-feature develop
```

When ready push your changes from this branch to remove (Github) and create a
new pull request against the **develop** branch.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.0
0.11.0
2 changes: 2 additions & 0 deletions cli/commands/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import (
// the CLI.
func GenerateCommandsIndex() []cli.Command {
start := NewStart()
status := NewStatus()

return []cli.Command{
start.ToCommand(),
status.ToCommand(),
}
}
89 changes: 89 additions & 0 deletions cli/commands/status.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
package commands

import (
"errors"
"fmt"
"log"
"strings"

"github.com/CityOfZion/neo-local/cli/services"
"github.com/CityOfZion/neo-local/cli/stack"
"github.com/urfave/cli"

"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"golang.org/x/net/context"
)

type (
// Status is the CLI command for checking the status of containers in the
// development environment.
Status struct{}
)

// NewStatus creates a new Status.
func NewStatus() Status {
return Status{}
}

// ToCommand generates the CLI command struct.
func (s Status) ToCommand() cli.Command {
return cli.Command{
Action: s.action(),
Aliases: []string{"ps"},
Flags: s.flags(),
Name: "status",
Usage: "Output overall health of network",
}
}

func (s Status) action() func(c *cli.Context) error {
return func(c *cli.Context) error {
ctx := context.Background()
cli, err := client.NewEnvClient()
if err != nil {
return errors.New("Unable to create Docker client")
}

ok := services.CheckDockerRunning(ctx, cli)
if !ok {
return errors.New("Docker is not running")
}

services := stack.Services()
runningContainers, err := cli.ContainerList(ctx, types.ContainerListOptions{})
if err != nil {
return err
}

for _, container := range runningContainers {
containerName := ""
for _, name := range container.Names {
if strings.Contains(name, "coz_neo-local_") { // TODO: this string should be a const.
fmt.Println(name)
containerName = name
break
}
}

if containerName == "" {
continue
}

for _, service := range services {
if strings.Contains(containerName, service.ContainerName()) {
log.Printf(
"%s in '%s' state", service.Image, container.State,
)
break
}
}
}

return nil
}
}

func (s Status) flags() []cli.Flag {
return []cli.Flag{}
}
2 changes: 1 addition & 1 deletion cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

const (
copyright = "MIT"
description = "Quickly setup a local environment for NEO smart contract development"
description = "Personal blockchain for NEO dApp development!"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cli/services/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ func dockerImageNames() []string {
"cityofzion/neo-python:v0.8.1",
"postgres:10.5",
"registry.gitlab.com/cityofzion/neo-scan/api:latest",
"registry.gitlab.com/cityofzion/neo-scan/sync:latest"
"registry.gitlab.com/cityofzion/neo-scan/sync:latest",
}
}
7 changes: 3 additions & 4 deletions scripts/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ version=$(cat ./VERSION)

set -e

if [[ $TRAVIS_BRANCH == 'master' || $TRAVIS_TAG == $version ]]
if [[ $TRAVIS_BRANCH == release/* ]]
then
make integration-tests
else
make check-version
make integration-tests
fi

make integration-tests

0 comments on commit c7ede47

Please sign in to comment.