Skip to content

Commit

Permalink
Extract HACKING.md, rename script
Browse files Browse the repository at this point in the history
  • Loading branch information
gavv committed Oct 12, 2024
1 parent d217a96 commit 83b24b3
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 60 deletions.
59 changes: 59 additions & 0 deletions HACKING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Hacking guide

## Development dependencies

Additional dependencies needed for development:

* [golangci-lint](https://golangci-lint.run/usage/install/#local-installation)

* [stringer](https://github.com/golang/tools)

`go install golang.org/x/tools/cmd/stringer@latest`

## Makefile targets

Update and build everything:

```
make
```

Run specific step:

```
make gen|build|lint|test|testall
```

Update go modules:

```
make tidy
```

Format code:

```
make fmt
```

## Making release

To release a new version:

* Create git tag

```
./make_tag.py --push <remote> <version>
```
e.g.
```
./make_tag.py --push origin 1.2.3
```
You can omit `--push origin` to only create a tag locally without pushing it to github.
* Wait until "Release" CI job completes and creates GitHub release draft.
* Edit GitHub release created by CI and publish it.
70 changes: 10 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,19 +168,6 @@ for {
}
```

## Versioning

Go bindings and the C library both use [semantic versioning](https://semver.org/).

Bindings are **compatible** with the C library when:

- **major** version of bindings **is same** as major version of C library
- **minor** version of bindings **is same or higher** as minor version of C library

Patch versions of bindings and C library are independent.

For example, version 1.2.3 of the bindings would be compatible with 1.2.x and 1.3.x, but not with 1.1.x (minor version is lower) or 2.x.x (major version is different).

## Installation

You will need to have Roc Toolkit library and headers installed system-wide. Refer to official build [instructions](https://roc-streaming.org/toolkit/docs/building.html) on how to install it.
Expand All @@ -191,61 +178,24 @@ After installing libroc, you can install bindings using regular `go get`:
go get github.com/roc-streaming/roc-go/roc
```

## Development

Install development dependencies:

* [golangci-lint](https://golangci-lint.run/usage/install/#local-installation)

* [stringer](https://github.com/golang/tools)

`go install golang.org/x/tools/cmd/stringer@latest`

Run all checks:

```
make
```

Run only specific checks:

```
make gen|build|lint|test|testall
```

Update modules:

```
make tidy
```

Format code:

```
make fmt
```

## Release
## Versioning

To release a new version:
Go bindings and the C library both use [semantic versioning](https://semver.org/).

* Create git tag
Bindings are **compatible** with the C library when:

```
./tag.py --push <remote> <version>
```
- **major** version of bindings **is same** as major version of C library
- **minor** version of bindings **is same or higher** as minor version of C library

e.g.
Patch versions of bindings and C library are independent.

```
./tag.py --push origin 1.2.3
```
For example, version 1.2.3 of the bindings would be compatible with 1.2.x and 1.3.x, but not with 1.1.x (minor version is lower) or 2.x.x (major version is different).

Or use **tag.py** without **--push** to only create a tag locally, and then push it manually.
## Hacking

* Wait until "Release" CI job completes and creates GitHub release draft.
Contributions are always welcome! You can find issues needing help using [help wanted](https://github.com/roc-streaming/roc-vad/labels/help%20wanted) and [good first issue](https://github.com/roc-streaming/roc-vad/labels/good%20first%20issue) labels.

* Edit GitHub release created by CI and publish it.
See [HACKING.md](HACKING.md) for details about the project internals.

## Authors

Expand Down
File renamed without changes.

0 comments on commit 83b24b3

Please sign in to comment.