Skip to content

Commit

Permalink
Merge pull request #1372 from tendermint/release/v0.17.0
Browse files Browse the repository at this point in the history
chore: release/v0.17.0
  • Loading branch information
lumtis authored Jul 15, 2021
2 parents b282aae + faeb7d8 commit 57f9982
Show file tree
Hide file tree
Showing 271 changed files with 10,256 additions and 3,908 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
*.md @barriebyron

# Primary repo maintainers
* @fadeev @ilgooz @lubtd @dshulyak
* @fadeev @ilgooz @lubtd @Pantani
34 changes: 34 additions & 0 deletions .github/workflows/gen-docs-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Generate Docs

on:
push:
branches:
- develop

jobs:
cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-go@v2
with:
go-version: 1.16

- name: Generate CLI Docs
run: ./scripts/gen-cli-docs

- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
title: "docs(cli): update generated docs"
commit-message: "docs(cli): update generated docs"
body: ""
branch: feat/gen-cli-docs

- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
4 changes: 2 additions & 2 deletions .github/workflows/release-binary.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: goreleaser
name: Release

on:
push:
tags:
- "*"

jobs:
goreleaser:
binary:
runs-on: ubuntu-latest
env:
working-directory: go/src/github.com/tendermint/starport
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Docker Image
name: Release
on:
release:
types: [published]
Expand All @@ -8,7 +8,7 @@ on:
- develop

jobs:
push_to_registry:
docker:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/stats.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
on:
schedule:
# Run this once per day, towards the end of the day for keeping the most
# recent data point most meaningful (hours are interpreted in UTC).
- cron: "0 23 * * *"
workflow_dispatch: # Allow for running this manually.

jobs:
j1:
name: Starport Repository Statistics
runs-on: ubuntu-latest
steps:
- name: run-ghrs
uses: jgehrcke/[email protected]
with:
ghtoken: ${{ secrets.ghrs_github_api_token }}

4 changes: 2 additions & 2 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test-Integration
name: Test

on:
pull_request:
Expand All @@ -8,7 +8,7 @@ on:
- develop

jobs:
test:
integration:
runs-on: ubuntu-latest

steps:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Lint
name: Test
on:
pull_request:
push:
branches:
- master
- develop
jobs:
golangci:
lint:
name: golangci-lint
runs-on: ubuntu-latest
timeout-minutes: 6
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: "Semantic PR"
name: Test

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
semantic_pr:
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# run unit tests for Starport.
name: Test

on:
Expand Down
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ brews:
name: "homebrew-tap"
install: |
bin.install "starport"
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build go install -v ./...
#
FROM base

COPY --from=builder /go/bin/starport /usr/bin

RUN useradd -ms /bin/bash tendermint
USER tendermint

COPY --from=builder /go/bin/starport /usr/bin

WORKDIR /apps

# see docs for exposed ports:
Expand Down
54 changes: 48 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,67 @@
#! /usr/bin/make -f

# Project variables.
PROJECT_NAME = starport
DATE := $(shell date '+%Y-%m-%dT%H:%M:%S')
VERSION = $(shell git describe --tags)
VERSION = development
HEAD = $(shell git rev-parse HEAD)
LD_FLAGS = -X github.com/tendermint/starport/starport/internal/version.Version='$(VERSION)' \
-X github.com/tendermint/starport/starport/internal/version.Head='$(HEAD)' \
-X github.com/tendermint/starport/starport/internal/version.Date='$(DATE)'
BUILD_FLAGS = -mod=readonly -ldflags='$(LD_FLAGS)'
BUILD_FOLDER = ./dist

pre-build:
@git fetch --tags

install: pre-build
## install: Install de binary.
install:
@echo Installing Starport...
@go install $(BUILD_FLAGS) ./...
@starport version

## build: Build the binary.
build:
@echo Building Starport...
@-mkdir -p $(BUILD_FOLDER) 2> /dev/null
@go build $(BUILD_FLAGS) -o $(BUILD_FOLDER) ./...

## clean: Clean build files. Also runs `go clean` internally.
clean:
@echo Cleaning build cache...
@-rm -rf $(BUILD_FOLDER) 2> /dev/null
@go clean ./...

## govet: Run go vet.
govet:
@echo Running go vet...
@go vet ./...

## format: Run gofmt.
format:
@echo Formatting...
@find . -name '*.go' -type f | xargs gofmt -d -s

## lint: Run Golang CI Lint.
lint:
@echo Running gocilint...
@golangci-lint run --out-format=tab --issues-exit-code=0

## test-unit: Run the unit tests.
test-unit:
@echo Running unit tests...
@go test -race -failfast -v ./starport/...

## test-integration: Run the integration tests.
test-integration: install
@echo Running integration tests...
@go test -race -failfast -v -timeout 60m ./integration/...

## test: Run unit and integration tests.
test: govet test-unit test-integration

help: Makefile
@echo
@echo " Choose a command run in "$(PROJECT_NAME)", or just run 'make' for install"
@echo
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
@echo

.DEFAULT_GOAL := install
.DEFAULT_GOAL := install
3 changes: 3 additions & 0 deletions actions/cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM starport/cli:develop

USER root
5 changes: 5 additions & 0 deletions actions/cli/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: cli
description: Starport CLI
runs:
using: docker
image: Dockerfile
22 changes: 22 additions & 0 deletions actions/cli/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Starport CLI Action
This action makes the `starport` CLI available as a Github Action.

## Quick start

Add a new workflow to your repo:

```yml
on: push

jobs:
help:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Print Help
uses: tendermint/starport/actions/cli@develop
with:
args: -h
```
50 changes: 50 additions & 0 deletions actions/release/vars/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: vars
description: Outputs variables that can be useful while creating a release
outputs:
should_release:
description: Indicates whether a release should be created or not
value: ${{ steps.vars.outputs.should_release }}
is_release_type_latest:
description: Shows if release type is latest (not a v* release)
value: ${{ steps.vars.outputs.is_release_type_latest }}
tag_name:
description: Name of the tag that should be used for release
value: ${{ steps.vars.outputs.tag_name }}
tarball_prefix:
description: A prefix to use in tarball asset names
value: ${{ steps.vars.outputs.tarball_prefix }}
runs:
using: "composite"
steps:
- id: vars
run: |
repo_name=${GITHUB_REPOSITORY##*/}
ref_name=${GITHUB_REF##*/}
default_branch=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
should_release=true
is_release_type_latest=false
tag_name=""
if [[ $GITHUB_REF == refs/tags/* ]]
then
tag_name=$ref_name
elif [[ $GITHUB_REF == refs/heads/* && $ref_name == $default_branch ]]
then
tag_name=latest
is_release_type_latest=true
else
should_release=false
fi
echo ::set-output name=should_release::$should_release
echo ::set-output name=is_release_type_latest::$is_release_type_latest
echo ::set-output name=tag_name::$tag_name
echo ::set-output name=tarball_prefix::"$repo_name"_$tag_name
shell: bash
- run: |
echo "- should_release: ${{ steps.vars.outputs.should_release }}"
echo "- is_release_type_latest: ${{ steps.vars.outputs.is_release_type_latest }}"
echo "- tag_name: ${{ steps.vars.outputs.tag_name }}"
echo "- tarball_prefix: ${{ steps.vars.outputs.tarball_prefix }}"
shell: bash
37 changes: 36 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Changelog

## v0.17

### Features:

- Added GitHub action that automatically builds and releases a binary
- The `--release` flag for the `build` command adds the ability to release binaries in a tarball with a checksum file.
- Added the flag `--no-module` to the command `starport app` to prevent scaffolding a default module when creating a new app
- Added `--dep` flag to specify module dependency when scaffolding a module
- Added support for multiple naming conventions for component names and field names
- Print created and modified files when scaffolding a new component
- Added `starport generate` namespace with commands to generate Go, Vuex and OpenAPI
- Added `starport chain init` command to initialize a chain without starting a node
- Scaffold a type that contains a single instance in the store
- Introduced `starport tools` command for advanced users. Existing `starport relayer lowlevel *` commands are also moved under `tools`.
- Added `faucet.rate_limit_window` property to `config.yml`
- Simplified the `cmd` package in the template
- Added `starport scaffold band` oracle query scaffolding
- Updated TypeScript relayer to 0.2.0
- Added customizable gas limits for the relayer

### Fixes:

- Use snake case for generated files
- Prevent using incorrect module name
- Fixed permissions issue when using Starport in Docker
- Ignore hidden directories when building a chain
- Fix error when scaffolding an IBC module in non-Starport chains

## `v0.16.2`

### Fix:

- Prevent indirect Buf dependency.

## `v0.16.1`

### Features:
Expand Down Expand Up @@ -69,7 +103,8 @@
- Integrated Stargate app's `scripts/protocgen` into Starport as a native feature. Running `starport build/serve` will automatically take care of building proto files without a need of script in the app's source code.
- Integrated third-party proto-files used by Cosmos SDK modules into Starport CLI
- Added ability to customize binary name with `build.binary` in `config.yml`
- Added ability to change path to home directory with `init.home` in `config.yml`
- Added ability to change path to home directory with `
.home` in `config.yml`
- Added ability to add accounts by `address` with in `config.yml`
- Added faucet functionality available on port 4500 and configurable with `faucet` in `config.yml`
- Added `starport faucet [address] [coins]` command
Expand Down
Loading

0 comments on commit 57f9982

Please sign in to comment.