Skip to content

Commit

Permalink
doc: how to release
Browse files Browse the repository at this point in the history
  • Loading branch information
zonca committed Dec 4, 2024
1 parent bc8204d commit cf50ca6
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,5 @@ This will print the content of the `animal.raw` file:

## Development

[Setup a development environment](./development.md)
* [Setup a development environment](./development.md)
* [Release a new version](./release.md)
64 changes: 64 additions & 0 deletions docs/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# How to release the packages

## Python package

The Python package is released to PyPI:

<https://pypi.org/project/awkward-kaitai/>

To release a new version, tag it in the repository and push the tag:

```bash
git tag -a 0.x.0 -m "Release 0.x.0"
git push origin 0.x.0
```

Then, create a new release on Github with the same tag and generate the release notes.

Make sure the repository is clean and the submodule has no extra changes:

```bash
git submodule update
```

Then, run the following commands to check the version:

```bash
pip install hatch
VERSION=$(hatch version)
echo $VERSION
```

And finally, release the package:

```bash
hatch release
```

if `hatch` complaints about `keyring` not working, disable it:

```bash
PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
```

## Jar file of the compiler

The jar file of `kaitai-struct-compiler` with Awkward support is built by:

```bash
cd kaitai_struct_compiler
sbt package
```

Is located at:

```bash
ls jvm/target/scala-*/kaitai-struct-compiler*.jar
```

It can be attached to the release on Github using [`gh`](https://cli.github.com/) with:

```bash
mv jvm/target/scala-*/kaitai-struct-compiler*.jar io.kaitai.kaitai-struct-compiler-0.10.jar
gh release upload $VERSION io.kaitai.kaitai-struct-compiler-0.10.jar
```

0 comments on commit cf50ca6

Please sign in to comment.