Skip to content

Commit

Permalink
Merge pull request #634 from tendermint/release/v0.13.2
Browse files Browse the repository at this point in the history
release/v0.13.2
  • Loading branch information
ilgooz authored Jan 11, 2021
2 parents b4e95f4 + db5e1bb commit f6dcc98
Show file tree
Hide file tree
Showing 52 changed files with 1,397 additions and 947 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/devices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
run: docker buildx build --tag ${{ secrets.DOCKERHUB_USERNAME }}/starport:amd64 --file .docker/Dockerfile.amd64 --platform linux/amd64 --cache-from ${{ secrets.DOCKERHUB_USERNAME }}/starport:amd64cache --cache-to ${{ secrets.DOCKERHUB_USERNAME }}/starport:amd64cache --push --progress tty .
run: docker buildx build --tag ${{ secrets.DOCKERHUB_USERNAME }}/starport --file .docker/Dockerfile.amd64 --platform linux/amd64 --cache-from ${{ secrets.DOCKERHUB_USERNAME }}/starport:amd64cache --cache-to ${{ secrets.DOCKERHUB_USERNAME }}/starport:amd64cache --push --progress tty .

arm64:
name: arm64 docker
Expand All @@ -56,7 +56,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
run: docker buildx build --tag ${{ secrets.DOCKERHUB_USERNAME }}/starport:arm64 --file .docker/Dockerfile.arm64 --platform linux/arm64 --cache-from ${{ secrets.DOCKERHUB_USERNAME }}/starport:arm64cache --cache-to ${{ secrets.DOCKERHUB_USERNAME }}/starport:arm64cache --push --progress tty .
run: docker buildx build --tag ${{ secrets.DOCKERHUB_USERNAME }}/starport --file .docker/Dockerfile.arm64 --platform linux/arm64 --cache-from ${{ secrets.DOCKERHUB_USERNAME }}/starport:cache --cache-to ${{ secrets.DOCKERHUB_USERNAME }}/starport:cache --push --progress tty .

pi:
name: Starport Pi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: go get -u github.com/gobuffalo/packr/v2/packr2

- name: Set up relayer
run: git clone https://github.com/ovrclk/relayer && cd relayer && git checkout 3080dab10e37e6db9e691c343b1c0cdb6d845753 && make install
run: git clone https://github.com/cosmos/relayer && cd relayer && git checkout 1daec66da1700c9fcd8900dbf06c70f2fd838cdf && make install

- name: Checkout
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-relayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: go get -u github.com/gobuffalo/packr/v2/packr2

- name: Set up relayer
run: git clone https://github.com/ovrclk/relayer && cd relayer && git checkout 3080dab10e37e6db9e691c343b1c0cdb6d845753 && make install
run: git clone https://github.com/cosmos/relayer && cd relayer && git checkout 1daec66da1700c9fcd8900dbf06c70f2fd838cdf && make install

- name: Checkout
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tasks:
brew install gh
# install rly
(cd /tmp && git clone https://github.com/ovrclk/relayer && cd relayer && git checkout 3080dab10e37e6db9e691c343b1c0cdb6d845753 && make -C /tmp/relayer install)
(cd /tmp && git clone https://github.com/cosmos/relayer && cd relayer && git checkout 1daec66da1700c9fcd8900dbf06c70f2fd838cdf && make -C /tmp/relayer install)
command: |
export VUE_APP_CUSTOM_URL=$(gp url)
Expand Down
34 changes: 11 additions & 23 deletions docs/1 Introduction/2 Install.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,32 @@
# Install Starport

**Prerequisites:** If you want to install Starport locally, make sure to have [Golang >=1.14](https://golang.org/) and [Node.js >=12.19.0](https://nodejs.org/) installed on your system. The latest version of Starport also requires [Protocol Buffer compiler](https://grpc.io/docs/protoc-installation/) to be installed.
**Prerequisites:** If you want to install Starport locally, make sure to have [Golang >=1.14](https://golang.org/). The latest version of Starport also requires [Protocol Buffer compiler](https://grpc.io/docs/protoc-installation/) to be installed. [Node.js >=12.19.0](https://nodejs.org/) is used to build the welcome screen, block explorer and to run the web scaffold.

## Installation Options
To install Starport:

### NPM

```bash
npm i -g @tendermint/starport
```
curl https://i.jpillora.com/tendermint/starport! | bash
```

This command will download the latest `starport` binary from Github and install it into `/usr/local/bin`. To learn more about how to install previous versions of the binary, refer to the [documentation](https://github.com/jpillora/installer).

### macOS with Homebrew
## macOS with Homebrew

```
brew install tendermint/tap/starport
```

<!-- ### Debian/Ubuntu with Snapcraft
## Build from source

```bash
snap install --classic node
```
Append your current working directory to the environment variable `PATH`:
```
export PATH=$PATH:$PWD/node_modules/.bin/
``` -->

### Build from source on Mac, Linux, and WSL

```bash
git clone https://github.com/tendermint/starport && cd starport && make
```

You'll find a freshly-baked `starport` binary in the build folder.
This will build and install `starport` binary into `$GOBIN`.

Note: When building from source, it is important to have your GOPATH set correctly. When in doubt, the folllowing should do:
Note: When building from source, it is important to have your `$GOPATH` set correctly. When in doubt, the folllowing should do:

```bash
```
mkdir ~/go
export GOPATH=~/go
```
2 changes: 1 addition & 1 deletion docs/1 Introduction/6 Starport IBC.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The two chains are now connected via IBC and you have successfully created a rel

## Sending tokens from `foo` to `bar`

Once the chains are connected, you can use a [relayer](https://github.com/ovrclk/relayer) CLI `rly` to create an IBC token send transaction:
Once the chains are connected, you can use a [relayer](https://github.com/cosmos/relayer) CLI `rly` to create an IBC token send transaction:

```
rly tx transfer foo bar 5token $(rly chains address bar)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ require (
golang.org/x/mod v0.4.0
golang.org/x/net v0.0.0-20201021035429-f5854403a974 // indirect
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
golang.org/x/sys v0.0.0-20201223074533-0d417f636930 // indirect
golang.org/x/sys v0.0.0-20210110051926-789bb1bd4061 // indirect
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf // indirect
google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154 // indirect
google.golang.org/grpc v1.33.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,8 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201223074533-0d417f636930 h1:vRgIt+nup/B/BwIS0g2oC0haq0iqbV3ZA+u6+0TlNCo=
golang.org/x/sys v0.0.0-20201223074533-0d417f636930/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210110051926-789bb1bd4061 h1:DQmQoKxQWtyybCtX/3dIuDBcAhFszqq8YiNeS6sNu1c=
golang.org/x/sys v0.0.0-20210110051926-789bb1bd4061/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf h1:MZ2shdL+ZM/XzY3ZGOnh4Nlpnxz5GSOhOmtHo3iPU6M=
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand Down
12 changes: 12 additions & 0 deletions integration/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,18 @@ func (e env) Scaffold(appName, sdkVersion string) (appPath string) {
step.Workdir(root),
)),
)

// Cleanup the home directory of the app
e.t.Cleanup(func() {
switch sdkVersion {
case Stargate:
os.RemoveAll(filepath.Join(e.Home(), fmt.Sprintf(".%s", appName)))
case Launchpad:
os.RemoveAll(filepath.Join(e.Home(), fmt.Sprintf(".%sd", appName)))
os.RemoveAll(filepath.Join(e.Home(), fmt.Sprintf(".%scli", appName)))
}
})

return filepath.Join(root, appName)
}

Expand Down
2 changes: 1 addition & 1 deletion integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
)

const (
relayerVersion = "3080dab10e37e6db9e691c343b1c0cdb6d845753"
relayerVersion = "1daec66da1700c9fcd8900dbf06c70f2fd838cdf"
)

func TestMain(m *testing.M) {
Expand Down
6 changes: 3 additions & 3 deletions integration/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"net/http"
"testing"

"github.com/pkg/errors"
"github.com/stretchr/testify/require"
"github.com/tendermint/starport/starport/pkg/cmdrunner"
"github.com/tendermint/starport/starport/pkg/cmdrunner/step"
Expand Down Expand Up @@ -117,10 +117,10 @@ func TestGetTxViaGRPCGateway(t *testing.T) {
return err
}

addr := fmt.Sprintf("%s/cosmos/tx/v1beta1/tx/%s", xurl.HTTP(servers.APIAddr), tx.Hash)
addr := fmt.Sprintf("%s/cosmos/tx/v1beta1/txs/%s", xurl.HTTP(servers.APIAddr), tx.Hash)
req, err := http.NewRequestWithContext(ctx, http.MethodGet, addr, nil)
if err != nil {
return err
return errors.Wrap(err, "call to get tx via gRPC gateway")
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

Starport is the easiest way to build a blockchain. It is a developer-friendly interface to the [Cosmos SDK](https://github.com/cosmos/cosmos-sdk), the world's most widely-used blockchain application framework. Starport generates boilerplate code for you, so you can focus on writing business logic.

* [**Build a blockchain with Starport in a web-based IDE**](https://gitpod.io/#https://github.com/tendermint/starport/)
* [**Build a blockchain with Starport in a web-based IDE** (stable)](https://gitpod.io/#https://github.com/tendermint/starport/tree/master) or use [nightly version](https://gitpod.io/#https://github.com/tendermint/starport/)
* [Check out the latest features in v0.13](https://www.youtube.com/watch?v=DhciTJHxvAY)

## Quick start

Open Starport [in your browser](https://gitpod.io/#https://github.com/tendermint/starport/), or [install it](/docs/1%20Introduction/2%20Install.md). Then:
Open Starport [in your browser](https://gitpod.io/#https://github.com/tendermint/starport/tree/master), or [install it](/docs/1%20Introduction/2%20Install.md). Then:

```
starport app github.com/foo/mychain
Expand Down
13 changes: 1 addition & 12 deletions starport/interface/cli/starport/cmd/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package starportcmd

import (
"github.com/spf13/cobra"
"github.com/tendermint/starport/starport/pkg/gomodulepath"
"github.com/tendermint/starport/starport/services/chain"
)

Expand All @@ -20,17 +19,7 @@ func NewBuild() *cobra.Command {
}

func buildHandler(cmd *cobra.Command, args []string) error {
path, err := gomodulepath.Parse(getModule(appPath))
if err != nil {
return err
}
app := chain.App{
Name: path.Root,
Path: appPath,
ImportPath: path.RawPath,
}

s, err := chain.New(app, false, logLevel(cmd))
s, err := chain.New(appPath, chain.LogLevel(logLevel(cmd)))
if err != nil {
return err
}
Expand Down
16 changes: 1 addition & 15 deletions starport/interface/cli/starport/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ package starportcmd

import (
"fmt"
"io/ioutil"
"log"
"path/filepath"
"strings"

"github.com/fatih/color"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -38,17 +34,7 @@ func New() *cobra.Command {
return c
}

func getModule(path string) string {
goModFile, err := ioutil.ReadFile(filepath.Join(path, "go.mod"))
if err != nil {
log.Fatal(err)
}
moduleString := strings.Split(string(goModFile), "\n")[0]
modulePath := strings.ReplaceAll(moduleString, "module ", "")
return modulePath
}

func logLevel(cmd *cobra.Command) chain.LogLevel {
func logLevel(cmd *cobra.Command) chain.LogLvl {
verbose, _ := cmd.Flags().GetBool("verbose")
if verbose {
return chain.LogVerbose
Expand Down
23 changes: 2 additions & 21 deletions starport/interface/cli/starport/cmd/relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"

"github.com/spf13/cobra"
"github.com/tendermint/starport/starport/pkg/gomodulepath"
"github.com/tendermint/starport/starport/services/chain"
)

Expand Down Expand Up @@ -42,16 +41,7 @@ func NewRelayerAdd() *cobra.Command {
}

func relayerInfoHandler(cmd *cobra.Command, args []string) error {
path, err := gomodulepath.Parse(getModule(appPath))
if err != nil {
return err
}
app := chain.App{
Name: path.Root,
Path: appPath,
}

s, err := chain.New(app, false, logLevel(cmd))
s, err := chain.New(appPath, chain.LogLevel(logLevel(cmd)))
if err != nil {
return err
}
Expand All @@ -64,16 +54,7 @@ func relayerInfoHandler(cmd *cobra.Command, args []string) error {
}

func relayerAddHandler(cmd *cobra.Command, args []string) error {
path, err := gomodulepath.Parse(getModule(appPath))
if err != nil {
return err
}
app := chain.App{
Name: path.Root,
Path: appPath,
}

s, err := chain.New(app, false, logLevel(cmd))
s, err := chain.New(appPath, chain.LogLevel(logLevel(cmd)))
if err != nil {
return err
}
Expand Down
13 changes: 1 addition & 12 deletions starport/interface/cli/starport/cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package starportcmd

import (
"github.com/spf13/cobra"
"github.com/tendermint/starport/starport/pkg/gomodulepath"
"github.com/tendermint/starport/starport/services/chain"
)

Expand All @@ -22,17 +21,7 @@ func NewServe() *cobra.Command {
}

func serveHandler(cmd *cobra.Command, args []string) error {
path, err := gomodulepath.Parse(getModule(appPath))
if err != nil {
return err
}
app := chain.App{
Name: path.Root,
Path: appPath,
ImportPath: path.RawPath,
}

s, err := chain.New(app, false, logLevel(cmd))
s, err := chain.New(appPath, chain.LogLevel(logLevel(cmd)))
if err != nil {
return err
}
Expand Down
Loading

0 comments on commit f6dcc98

Please sign in to comment.