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

  1. Write a short section to README.md about changes in this release

  2. Bump version in main.go:const AppVersion having the desired version number

  3. 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).

  1. Increase the version to this release version in README.md

  2. Clear README.md (Final release, thanks for your patience and enjoy)

  3. Bump version in deployment.go:const version_*

  4. Tag the commit which bumped the version in the previous step (0.x.y not v0.x.y)

Combapp

  1. Write CHANGELOG.md (according to the combdownloader and combfullui release notes)

  2. Bump version to the desired combapp version number in build.gradle (app/build.gradle:versionCode and versionName)

  3. Write the version infos about combdownloader and combfullui to blobinfo.txt (src/main/res/raw/blobinfo.txt)

  4. Change blob filenames in ActivityMain (src/main/java/org/codeberg/watashi564/ActivityMain.java)

    • Line 35,36

    • Line 158

    • Line 182

  5. Create empty files in raw folder (src/branch/master/app/src/main/res/raw) according to blobinfo.txt

  6. Try compilation in android studio (this is not the final apk)

  7. 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

  1. Go to directory with the fresh Dockerfile

  2. Run (sudo) docker build

  3. 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.

  4. Copy out the binaries out from docker to host machine using (sudo) docker cp

  5. Create a release on codeberg, write the hashes, feature notes and attach the files to the codeberg release.

Combapp

  1. Copy the arm64.bin to the raw folder in the combapp source tree and rename them as per blobinfo.txt.

  2. Open android studio and click build the release apk

  3. Enter the .jks file key

  4. On success, rename the apk appropriately

  5. Create a release on codeberg, write the hashes, feature notes and attach the files to the codeberg release.

Phase 3: Docker image

  1. 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)

  2. We do (sudo) docker build, a hash foobar is printed

  3. Using (sudo) docker login we login to dockerhub

  4. (sudo) docker image tag haircomb:latest bar

  5. (sudo) docker image tag haircomb:<desired version> <foobar>

  6. (sudo) docker image push <foobar>

  7. Both latest and the desired version should be tagged and pushed (same image for both).

  8. (sudo) docker logout

Phase 4: informing users

  1. A post is made on bitcointalk.org

  2. A post is made on other media

Last updated