Releasing Haircomb
The guide to make a new Haircomb release
Requirements
The Haircomb is released on a Linux machine with docker and android studio installed.
Access and keys needed
Android studio signing key
.jks file
password
Codeberg git repo
username or email
password
Bitcointalk forum release announcement
username
password
Docker hub image upload
username
password
Phase 1: git repository preparation
Combdownloader-ng
Write a short section to README.md about changes in this release
Bump version in main.go:const AppVersion having the desired version number
Tag the commit which bumped the version in the previous step (0.x.y not v0.x.y)
Combfullui
There are many repos (one repo per version in development), because historically it wasn't possible to apply security patches to branches on bitbucket, and the workflow stuck.
In this case the dev writes to the README.md about every feature added, and upon release the README.md is cleared and the feature info (if any) is moved to other websites (release notes).
Increase the version to this release version in README.md
Clear README.md (Final release, thanks for your patience and enjoy)
Bump version in deployment.go:const version_*
Tag the commit which bumped the version in the previous step (0.x.y not v0.x.y)
Combapp
Write CHANGELOG.md (according to the combdownloader and combfullui release notes)
Bump version to the desired combapp version number in build.gradle (app/build.gradle:versionCode and versionName)
Write the version infos about combdownloader and combfullui to blobinfo.txt (src/main/res/raw/blobinfo.txt)
Change blob filenames in ActivityMain (src/main/java/org/codeberg/watashi564/ActivityMain.java)
Line 35,36
Line 158
Line 182
Create empty files in raw folder (src/branch/master/app/src/main/res/raw) according to blobinfo.txt
Try compilation in android studio (this is not the final apk)
If success, tag the commit (v0.x.y not 0.x.y)
Phase 2: binaries release
We need both Combdownloader and Combfullui binary for the combapp, that's why Combapp binary is released last.
Secondly we build the binaries using docker (bin / exe) or android studio (apk). It is required to know the golang compiler version to be used ahead, and the software must be well-tested and be stable when built using the compiler version. The compiler version must be updated in each Dockerfile.
Go mod dependencies: To have reproducible builds in docker, don't use go modules system. The developer tests using whatever versions go mod tidy
provides. When releasing, the dev writes every dependency version to Dockerfile (except those which the author didn't tagged, normally these are set to master because the project is abandoned anyway. If not, we can ask the dev to tag it)
Combdownloader-ng, Combfullui
Go to directory with the fresh Dockerfile
Run (sudo) docker build
Write the sha256 sums to a new entry in the reproducible repository. There will be as many sha256 sums as many new entries needed to be added. The Dockerfile is also added to the reproducible repository.
Copy out the binaries out from docker to host machine using (sudo) docker cp
Create a release on codeberg, write the hashes, feature notes and attach the files to the codeberg release.
Combapp
Copy the arm64.bin to the raw folder in the combapp source tree and rename them as per blobinfo.txt.
Open android studio and click build the release apk
Enter the .jks file key
On success, rename the apk appropriately
Create a release on codeberg, write the hashes, feature notes and attach the files to the codeberg release.
Phase 3: Docker image
In the combdocker repo, there is a combined Dockerfile made from both combfullui and combdownloader. This should be updated to reflect phase 2 (we focus on repo url, compiler version and deps versions)
We do (sudo) docker build, a hash foobar is printed
Using (sudo) docker login we login to dockerhub
(sudo) docker image tag haircomb:latest bar
(sudo) docker image tag haircomb:<desired version> <foobar>
(sudo) docker image push <foobar>
Both latest and the desired version should be tagged and pushed (same image for both).
(sudo) docker logout
Phase 4: informing users
A post is made on bitcointalk.org
A post is made on other media
Last updated