trustgraph/DEVELOPER_GUIDE.md

79 lines
1.8 KiB
Markdown
Raw Normal View History

2024-10-03 17:40:26 +01:00
2024-10-03 17:46:09 +01:00
# Developer's guide
2024-10-03 17:45:07 +01:00
2024-10-03 17:46:09 +01:00
## Release management
2024-10-03 17:45:07 +01:00
2024-10-03 17:40:26 +01:00
To do a public release you need to...
- Get the git directory ready for the release
2024-10-03 17:43:23 +01:00
- Tag the repo e.g.
```
2024-10-03 17:40:26 +01:00
git tag -a v1.2.3 -m ''
git push --tags
2024-10-03 17:43:23 +01:00
```
2024-10-03 17:40:26 +01:00
2024-10-03 17:43:23 +01:00
- Generate the deploy templates, don't add the `v` to the version number.
2024-10-03 17:40:26 +01:00
2024-10-03 17:43:23 +01:00
```
2024-10-03 17:40:26 +01:00
templates/generate-all deploy.zip 1.2.3
2024-10-03 17:43:23 +01:00
```
2024-10-03 17:40:26 +01:00
- Release
- Go to github, on Code tab, select tags, and find the right version
- Select create release
- Select the right previous version and generate release notes
- At the bottom of the form, find the upload pad, click that and add the
deploy.zip created earlier
2024-10-03 17:43:23 +01:00
- Create Python packages. You need a PyPi token with access to our repos
2024-10-03 17:40:26 +01:00
- make packages
- make pypi-upload
2024-10-03 17:43:23 +01:00
- Create containers. You need a docker hub token with acccess to our repos
2024-10-03 17:40:26 +01:00
- make
- make push
2024-10-03 17:46:09 +01:00
## Local build
2024-10-03 17:45:07 +01:00
2024-10-03 17:40:26 +01:00
To do a local build, you need to...
- Consider what version you want to build at, and change this in Makefile.
It doesn't really matter so long as there isn't a clash with what's in
the public repos. You could stick with the version that's there, or
change to 0.0.0 if you're paranoid about pushing something accidentally.
2024-10-03 17:43:23 +01:00
- If you changed the version to generate templates with your version, or
changed deployment templates, you need to recreate launch assets to
a deploy.zip file:
2024-10-03 17:40:26 +01:00
2024-10-03 17:43:23 +01:00
```
2024-10-03 17:40:26 +01:00
templates/generate-all deploy.zip V.V.V
2024-10-03 17:43:23 +01:00
```
- Build containers
2024-10-03 17:40:26 +01:00
2024-10-03 17:43:23 +01:00
```
2024-10-03 17:44:15 +01:00
make
2024-10-03 17:43:23 +01:00
```
2024-10-03 17:40:26 +01:00
- If you changed anything which affects command line stuff (which maybe
you could do if you changed schemas), then
2024-10-03 17:44:15 +01:00
```
make packages
```
2024-10-03 17:40:26 +01:00
That puts Python packages in dist/ You then need to install some or
all of those packages. Typically you only need -base and -cli to
an appropriate environment e.g. use Python `venv` to create a virtual
environment and install them there.