meshtastic/docs/development/documentation/publish.mdx

143 lines
4.9 KiB
Plaintext
Raw Normal View History

---
2021-11-16 20:05:19 -08:00
id: publish
2022-11-02 11:46:54 -07:00
title: Publishing Meshtastic.org
2022-11-04 10:06:45 -07:00
sidebar_label: Publish
---
2022-11-04 10:06:45 -07:00
## Publish Live
### Device
2022-03-08 04:12:46 -08:00
- Update protobufs
```shell
cd proto
git checkout master && git pull
cd ..
git add proto
git commit -m "updating proto submodule to latest"
run bin/regen-protos.sh
```
2022-03-08 04:12:46 -08:00
- edit version.properties to set release version
- commit and push (or merge) to root of repo - this should cause GitHub to start a release build (see the CI actions)
- edit the draft release text and click publish
2022-11-04 10:06:45 -07:00
#### Update Protobufs
2022-11-04 10:06:45 -07:00
### Android
2022-11-04 10:06:45 -07:00
#### Pre-requisites
2021-12-10 20:17:31 -08:00
2022-03-08 04:12:46 -08:00
- Add repository secrets
- - KEYSTORE_FILENAME
- - - name of the .jks
- - KEYSTORE
- - - we will convert the .jks to base64
- - - openssl base64 < filename.jks | tr -d '\n' | tee filename.txt
- - KEYSTORE_PROPERTIES
- - - storePassword=nononononono
keyPassword=nononononono
keyAlias=upload
storeFile=nononononono.jks
2021-11-16 19:52:00 -08:00
2022-11-04 10:06:45 -07:00
#### Instructions - Automated
2021-12-10 20:17:31 -08:00
2022-03-08 04:12:46 -08:00
- Update protobufs
- Go to Actions / Make Release / Run Workflow
- Pick the Releases branch
- Enter the version found in app/gradle.build
2022-02-12 15:05:34 -08:00
2022-11-04 10:06:45 -07:00
### iOS
2021-11-16 19:52:00 -08:00
TBD
2022-11-04 10:06:45 -07:00
### Meshtastic-flasher
2022-02-12 15:05:34 -08:00
A `meshtastic-flasher` release consists of publishing the release to PyPi https://pypi.org/project/meshtastic-flasher/ as well as producing single-executable files that are downloadable from Github https://github.com/meshtastic/Meshtastic-gui-installer/releases.
2022-11-04 10:06:45 -07:00
#### Instructions - automated
2022-02-12 15:05:34 -08:00
2022-03-08 04:12:46 -08:00
- Go to Actions / Make Release / Run Workflow https://github.com/meshtastic/Meshtastic-gui-installer/actions/workflows/release.yml
- Draft & Publish release https://github.com/meshtastic/Meshtastic-gui-installer/releases
2022-02-12 15:05:34 -08:00
2022-11-04 10:06:45 -07:00
### Python
2022-01-26 12:24:19 -08:00
A python release consists of publishing the release to PyPi https://pypi.org/project/meshtastic/ as well as producing single-executable files that are downloadable from Github https://github.com/meshtastic/Meshtastic-python/releases.
2022-11-04 10:06:45 -07:00
#### Pre-requisites
2021-11-16 19:52:00 -08:00
2022-01-26 12:24:19 -08:00
No pre-requisites are needed locally to make a release. All builds are done via Github Actions currently.
To test/validate, you will need to run:
```
pip3 install -r requirements.txt
pip install .
```
2022-11-04 10:06:45 -07:00
#### Instructions
2022-03-08 04:12:46 -08:00
- Update protobufs by running the "Update protobufs" workflow in Actions: https://github.com/meshtastic/Meshtastic-python/actions/workflows/update_protobufs.yml
2022-01-26 12:24:19 -08:00
2022-03-08 04:12:46 -08:00
- run the "smoke1" test (optional):
2022-01-26 12:24:19 -08:00
connect one device to the serial port and run:
```
pytest -m smoke1
```
2022-03-08 04:12:46 -08:00
- run unit tests: `pytest` (optional)
2022-01-26 12:24:19 -08:00
2022-03-08 04:12:46 -08:00
- run bin/test-release.sh (optional)
2022-01-26 12:24:19 -08:00
2022-03-08 04:12:46 -08:00
- Run the "Make Release" workflow in Actions: https://github.com/meshtastic/Meshtastic-python/actions/workflows/release.yml
2022-01-26 12:24:19 -08:00
2022-03-08 04:12:46 -08:00
- After the "Make Release" is done, go into Releases: https://github.com/meshtastic/Meshtastic-python/releases There should be a draft. Add the title, update the "What's Changed" (Tip: Click on the "Auto-generate release notes" button.). Uncheck the "This is a pre-release" (if applicable).
:::note
You need permissions in the GitHub project to make a build
2022-01-02 22:53:45 -08:00
:::
2022-03-08 04:12:46 -08:00
2022-11-04 10:06:45 -07:00
### Web
2022-03-08 04:12:46 -08:00
2022-10-31 01:45:14 -07:00
Releases are automatically generated for every commit as per out [CI](https://github.com/meshtastic/web/blob/master/.github/workflows/main.yml). This performs two actions:
2022-03-08 04:12:46 -08:00
2022-10-31 01:45:14 -07:00
1. Generates a perpetually updated [GitHub release](https://github.com/meshtastic/web/releases/tag/latest) with an accompanying `build.tar` that a automatically get's pulled by the firmware CI at build time.
2022-03-08 04:12:46 -08:00
2. A hosted version is deployed to [client.meshtastic.org](https://client.meshtastic.org).
2022-11-04 10:06:45 -07:00
## Publish to Vercel
Setting up a Vercel account is an optional step that can help you view your changes to the documentation in a server environment just like the actual docs. This can be helpful to include when submitting a pull request so that developers can review your changes and visually check that things look correct.
### Set up Vercel account
- Go to [vercel.com](https://vercel.com)
- Login with your GitHub account, click `Continue with GitHub`
### Link your fork of the project
- Click `New Project`
- Under `Import Git Repository` select `+ Add GitHub Account`
You'll be redirected to GitHub to allow access to select repositories.
- Select your fork of the project: `username/Meshtastic`
### Configure project
Configure project:
- Set a name for the project
- Select a framework preset: `Docusaurus 2`
- Click `Deploy`
That's it! You should now see your project with a green or orange status dot showing that your fork of the project has been compiled. There will be a commit-specific url that you can share to view your changes. There also will be a branch-specific url that you can view. If there are any errors it will show up red and include the logs for you to figure out what has gone wrong.
:::tip
There is a limited number of branch urls that you will be able to view. If you notice that option has disappeared, you can delete unused branches on your fork and that will enable that feature again.
Branch urls are helpful in PRs because they will remain constant, and you won't need to resubmit a new url for review each new commit if changes are requested.
:::