Skip to content

Commit

Permalink
update readme and releasing files post-release. (#560)
Browse files Browse the repository at this point in the history
* update readme and releasing files post-release.

Signed-off-by: Scott Nichols <snichols@vmware.com>

* linting

Signed-off-by: Scott Nichols <snichols@vmware.com>

* update docs/index.md for release v2.2.0

Signed-off-by: Scott Nichols <snichols@vmware.com>
  • Loading branch information
Scott Nichols committed Jul 28, 2020
1 parent 485e6f8 commit 70e4358
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 54 deletions.
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ Official CloudEvents SDK to integrate your application with CloudEvents.

This library will help you to:

* Represent CloudEvents in memory
* Use [Event Formats](https://github.com/cloudevents/spec/blob/v1.0/spec.md#event-format) to serialize/deserialize CloudEvents
* Use [Protocol Bindings](https://github.com/cloudevents/spec/blob/v1.0/spec.md#protocol-binding) to send/receive CloudEvents
- Represent CloudEvents in memory
- Use
[Event Formats](https://github.com/cloudevents/spec/blob/v1.0/spec.md#event-format)
to serialize/deserialize CloudEvents
- Use
[Protocol Bindings](https://github.com/cloudevents/spec/blob/v1.0/spec.md#protocol-binding)
to send/receive CloudEvents

_Note:_ Supported
[CloudEvents specification](https://github.com/cloudevents/spec): 0.3, 1.0
Expand All @@ -24,7 +28,7 @@ _Note:_ Supported go version: 1.13+
Add the module as dependency using go mod:

```
% go get github.com/cloudevents/sdk-go/v2@v2.1.0
% go get github.com/cloudevents/sdk-go/v2@v2.2.0
```

And import the module in your code
Expand Down Expand Up @@ -104,9 +108,10 @@ err := json.Unmarshal(bytes, &event)

## Go further

* Look at the complete documentation: https://cloudevents.github.io/sdk-go/
* Dig into the godoc: https://godoc.org/github.com/cloudevents/sdk-go/v2
* Check out the [samples directory](./samples) for an extended list of examples showing the different SDK features
- Look at the complete documentation: https://cloudevents.github.io/sdk-go/
- Dig into the godoc: https://godoc.org/github.com/cloudevents/sdk-go/v2
- Check out the [samples directory](./samples) for an extended list of examples
showing the different SDK features

## Community

Expand Down
106 changes: 61 additions & 45 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,59 +12,75 @@ General rules that apply to both releases:

## Releasing v1.+

For v1 releases, just perform a GitHub release flow, and that is it.
For v1 releases, just perform a GitHub release flow, and that is it.

## Releasing v2.+

Releasing v2 is more tricky, the project has been broken into modules and are released independently but there is a depency chain.
Releasing v2 is more tricky, the project has been broken into modules and are
released independently but there is a depency chain.

_Note_: Any tag that matches `v*` or `protocol*` will produce a draft GitHub release using GitHub Actions.
_Note_: Any tag that matches `v*` or `protocol*` will produce a draft GitHub
release using GitHub Actions.

_Note_: The following steps assume the repo is checked out directly. Switch to `origin` to the remote name used if using a fork with a remote.
_Note_: The following steps assume the repo is checked out directly. Switch to
`origin` to the remote name used if using a fork with a remote.

Steps:

1. Create a branch, in the form `release-<major>.<minor>`, i.e:
```
branch=release-2.1
git checkout -b $branch
git push -u origin $branch
```

```shell
branch=release-2.1
git checkout -b $branch
git push -u origin $branch
```

1. Tag the new branch with the correct release tag, i.e:
```
tag=v2.1.0
git tag $tag
git push origin $tag
```
1. Run `./hack/tag-release.sh --tag --push` to update and tag the dependencies. Or do it manualy with the following:

1. Update the each protocol to use the new release rather than the replace directive in their `go mod` files. Example for `stan`:
```
tag=v2.1.0
pushd protocol/stan/v2
go mod edit -dropreplace github.com/cloudevents/sdk-go/v2
go get -d github.com/cloudevents/sdk-go/v2@$tag
popd
```
_NOTE_: to reverse the `dropreplace` command, run `go mod edit -replace github.com/cloudevents/sdk-go/v2=../../../v2`

1. Release each protocol with a new tag that lets go mod follow the tag to the source in the form `<path>/v<major>.<minor>.<patch>`, i.e.:
```
tag=protocol/stan/v2.1.0
pushd protocol/stan/v2
git tag $tag
git push origin $tag
popd
```

1. Run `./hack/tag-release.sh --samples` to update the sample dependencies (both the core sdk and protcol) after all releases are published. Or do it manualy with the following:
```
tag=v2.1.0
pushd sample/stan
go mod edit -dropreplace github.com/cloudevents/sdk-go/protocol/stan/v2
go get -d github.com/cloudevents/sdk-go/protocol/stan/v2@$tag
go mod edit -dropreplace github.com/cloudevents/sdk-go/v2
go get -d github.com/cloudevents/sdk-go/v2@$tag
popd
```

```shell
tag=v2.1.0
git tag $tag
git push origin $tag
```

1. Run `./hack/tag-release.sh --tag --push` to update and tag the dependencies.
Or do it manualy with the following:

1. Update the each protocol to use the new release rather than the replace
directive in their `go mod` files. Example for `stan`:

```shell
tag=v2.1.0
pushd protocol/stan/v2
go mod edit -dropreplace github.com/cloudevents/sdk-go/v2
go get -d github.com/cloudevents/sdk-go/v2@$tag
popd
```

_NOTE_: to reverse the `dropreplace` command, run
`go mod edit -replace github.com/cloudevents/sdk-go/v2=../../../v2`

1. Release each protocol with a new tag that lets go mod follow the tag to
the source in the form `<path>/v<major>.<minor>.<patch>`, i.e.:

```shell
tag=protocol/stan/v2.1.0
pushd protocol/stan/v2
git tag $tag
git push origin $tag
popd
```

1. Run `./hack/tag-release.sh --samples` to update the sample dependencies (both
the core sdk and protcol) after all releases are published. Or do it manualy
with the following:

```shell
tag=v2.1.0
pushd sample/stan
go mod edit -dropreplace github.com/cloudevents/sdk-go/protocol/stan/v2
go get -d github.com/cloudevents/sdk-go/protocol/stan/v2@$tag
go mod edit -dropreplace github.com/cloudevents/sdk-go/v2
go get -d github.com/cloudevents/sdk-go/v2@$tag
popd
```
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ _Note:_ Supported
Add the module as dependency using go mod:

```
% go get github.com/cloudevents/sdk-go/v2@V2.0.0-RC2
% go get github.com/cloudevents/sdk-go/v2@v2.2.0
```

And import the module in your code
Expand Down
2 changes: 1 addition & 1 deletion hack/tag-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -o pipefail

# This is run after the major release is published.

VERSION=v2.1.0
VERSION=v2.2.0

# It is intended that this file is run locally. For a full release tag, confirm the version is correct, and then:
# ./hack/tag-release.sh --tag --push
Expand Down

0 comments on commit 70e4358

Please sign in to comment.