Skip to content

Commit

Permalink
Merge pull request #154 from aeternity/release/v9.0.0
Browse files Browse the repository at this point in the history
Release v9.0.0
  • Loading branch information
mradkov authored Jun 16, 2021
2 parents 42123be + 29822cf commit 22c8b7c
Show file tree
Hide file tree
Showing 335 changed files with 14,436 additions and 5,374 deletions.
30 changes: 30 additions & 0 deletions .chglog/CHANGELOG.tpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})

{{ range .CommitGroups -}}
### {{ .Title }}

{{ range .Commits -}}
* {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} ([{{ .Hash.Short }}]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Long }}))
{{ end }}
{{ end -}}

{{- if .RevertCommits -}}
### Reverts

{{ range .RevertCommits -}}
* {{ .Revert.Header }}
{{ end }}
{{ end -}}

{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}

{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
21 changes: 21 additions & 0 deletions .chglog/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/aeternity/aepp-sdk-go
options:
commit_groups:
title_maps:
feat: Features
fix: Bug Fixes
perf: Performance Improvements
refactor: Code Refactoring
header:
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
pattern_maps:
- Type
- Scope
- Subject
notes:
keywords:
- BREAKING CHANGE
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
TAG=v5.2.0
COMPILER_TAG=v4.0.0
TAG=v6.0.0
COMPILER_TAG=v6.0.0
87 changes: 30 additions & 57 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,45 @@
name: Go
on:
push:
tags:
- refs/tags/*
name: Test, build, and release
on: [push, pull_request]
jobs:

build:
name: Build
main:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.13
uses: actions/setup-go@v1
- uses: actions/setup-go@v2
with:
go-version: 1.13
id: go
go-version: 1.16

- name: Check out code into the Go module directory
uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Get dependencies
- name: Lint
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
go get honnef.co/go/tools/cmd/[email protected]
make lint
fi
- run: make test-unit
- run: docker-compose up -d
- name: Ensure that node is running
run: |
while [[ `curl -s -o /dev/null -w %{http_code} localhost:3013/api` != 200 ]]; do
sleep 0.2;
done
- run: make test-integration

- name: Build
if: true != startsWith(github.ref, 'refs/tags/')
run: make build-release
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build release
if: startsWith(github.ref, 'refs/tags/')
run: make build-release

- name: Publish release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
files: |
dist/windows.zip
dist/darwin.zip
dist/linux.zip
draft: true
prerelease: false
- name: Upload Release Asset - Windows
id: upload-release-asset-win
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/windows.zip
asset_name: windows.zip
asset_content_type: application/zip
- name: Upload Release Asset - Mac
id: upload-release-asset-darwin
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/darwin.zip
asset_name: darwin.zip
asset_content_type: application/zip
- name: Upload Release Asset - Linux
id: upload-release-asset-linux
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/linux.zip
asset_name: linux.zip
asset_content_type: application/zip
911 changes: 854 additions & 57 deletions CHANGELOG.md

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@ Let's start from the bottom upwards.

# Testing
## Unit tests
`go test $(go list ./... |grep -v integration_test)`
`make test-unit`

## Integration tests
```
# ensure .env has the node/compiler versions you want to test
docker-compose up node compiler
export AETERNITY_ALICE_PRIVATE_KEY=.....
export AETERNITY_BOB_PRIVATE_KEY=.....
go test ./integration_test -count=1 # count is needed because Go caches test results if they were successful.
docker-compose up
make test-integration
```
12 changes: 0 additions & 12 deletions Dockerfile.ci

This file was deleted.

52 changes: 0 additions & 52 deletions Jenkinsfile

This file was deleted.

70 changes: 18 additions & 52 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,30 +1,15 @@
GOFILES = $(shell find . -name '*.go' -not -path './vendor/*')
GOPACKAGES = $(shell go list ./... | grep -v /vendor/)
GIT_DESCR = $(shell git describe --tags --always)
GOPACKAGES_UNIT = $(shell go list ./... | grep -v /vendor/ | grep -v integration_test)
GIT_DESCR = $(shell git describe --tags --always)
APP=aecli
# build output folder
OUTPUTFOLDER = dist
# docker image
DOCKER_IMAGE = aeternity/aepps-sdk-go
DOCKER_TAG = $(shell git describe --tags --always)
# build paramters
OS = linux
ARCH = amd64

.PHONY: list
list:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs

default: build

workdir:
mkdir -p dist

build: build-dist

build-dist: $(GOFILES)
build: $(GOFILES)
@echo build binary to $(OUTPUTFOLDER)
GOOS=$(OS) GOARCH=$(ARCH) CGO_ENABLED=0 go build -ldflags "-X main.Version=$(GIT_DESCR)" -o $(OUTPUTFOLDER)/$(APP) .
CGO_ENABLED=0 go build -ldflags "-X main.Version=$(GIT_DESCR)" -o $(OUTPUTFOLDER)/$(APP) .
@echo copy resources
cp -r README.md LICENSE $(OUTPUTFOLDER)
@echo done
Expand All @@ -45,47 +30,28 @@ build-release:
zip -r $(OUTPUTFOLDER)/$(OS).zip $(OUTPUTFOLDER)/$(OS)
@echo done

test: test-all
test: test-unit test-integration

test-all:
@go test -v $(GOPACKAGES) -coverprofile .testCoverage.txt
test-unit:
go test -v $(GOPACKAGES_UNIT)

bench: bench-all
test-integration:
go test -v ./integration_test

bench-all:
@go test -bench -v $(GOPACKAGES)
bench:
go test -bench -v ./...

lint: lint-all
lint:
staticcheck ./...

lint-all:
@golint -set_exit_status $(GOPACKAGES)

install: build-dist
@cp dist/aecli $(GOPATH)/bin
install: build
@cp $(OUTPUTFOLDER)/$(APP) $(GOPATH)/bin
@echo copied to GOPATH/bin

clean:
@echo remove $(OUTPUTFOLDER) folder
@rm -rf dist
@rm -rf $(OUTPUTFOLDER)
@echo done

docker: docker-build

docker-build: build-dist
@echo copy resources
@cp config/settings.docker.yaml $(OUTPUTFOLDER)/settings.yaml
@echo build image
docker build -t $(DOCKER_IMAGE):$(DOCKER_TAG) -f ./build/docker/Dockerfile .
@echo done

docker-push: docker-build
@echo push image
docker tag $(DOCKER_IMAGE):$(DOCKER_TAG) $(DOCKER_IMAGE):latest
docker push $(DOCKER_IMAGE)
@echo done

docker-run:
@docker run -p 1804:1804 $(DOCKER_IMAGE)

debug-start:
@go run main.go -c config/settings.sample.yaml --debug start
changelog:
git-chglog -o CHANGELOG.md
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ golang sdk for aeternity blockchain
`go get github.com/aeternity/aepp-sdk-go`

If your project uses Go Modules (go.mod, go.sum files), you must include the major version in the import line like this:
`import github.com/aepp-sdk-go/v8/aeternity`
`import github.com/aepp-sdk-go/v9/aeternity`

If your project won't use Go Modules (no go.mod, go.sum files), ensure your `$GOPATH/src/github.com/aeternity/aepp-sdk-go` is on the correct branch. Then your import should be:
`import github.com/aepp-sdk-go/aeternity`
Expand Down
4 changes: 2 additions & 2 deletions account/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os"
"path/filepath"

"github.com/aeternity/aepp-sdk-go/v8/binary"
"github.com/aeternity/aepp-sdk-go/v9/binary"
"golang.org/x/crypto/ed25519"
)

Expand All @@ -21,7 +21,7 @@ type Account struct {
func loadFromPrivateKeyRaw(privb []byte) (account *Account, err error) {
defer func() {
if r := recover(); r != nil {
err = fmt.Errorf("Invalid private key")
err = fmt.Errorf("invalid private key")
}
}()
account = loadFromPrivateKey(ed25519.PrivateKey(privb))
Expand Down
2 changes: 1 addition & 1 deletion account/bip32.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

// ErrHardenedChildPublicKey is returned when trying to create a hardened child
// from a public key.
var ErrHardenedChildPublicKey = errors.New("Can't create hardened child from public key")
var ErrHardenedChildPublicKey = errors.New("can't create hardened child from public key")

// ErrHardenedOnly is returned when a node in the path is not hardened.
var ErrHardenedOnly = errors.New("ed25519 only works with hardened children")
Expand Down
Loading

0 comments on commit 22c8b7c

Please sign in to comment.