Dave Jarvis' Repositories

# Overview

This document describes how to maintain the containerized typesetting system.
The container is built locally then deployed to a web server capable of
serving static web pages.

## Installation wizard

The installation wizard is responsible for installing the containerization
software and the container image. The container manager class loads the
image from a URL. That URL is defined in the `messages.properties` file.

# Upgrade

## Themes

If changes have been made to the themes, upgrade them as follows:

1. Change to the themes repository directory.

    cd $HOME/dev/java/keenwrite/themes

1. Tag the themes, such as:

    git tag -a 1.11.0 -m "message"
    git push --tags

1. Ensure the host path file exists; it must include remote server name:

    test -f host-path.txt && echo "exists"

1. Create the release and release notes via the web.

1. Run the release script to upload the release akchive:

    ./release.sh

1. Edit `src/main/resources/com/keenwrite/messages.properties`.
1. Set `Wizard.typesetter.themes.version` to the version.
1. Set `Wizard.typesetter.themes.checksum` to the checksum.

The themes are released.

## Container

Upgrade the containerization software (e.g., podman or docker) as follows:

1. Download the latest container version.

    wget -q $(\
      wget \
      -q -O- \
      https://api.github.com/repos/containers/podman/releases/latest | \
      jq \
      -r '.assets[] | select(.name | contains("exe")) | .browser_download_url')

1. Compute the SHA:

    sha256sum *setup.exe | cut -f1 -d' '

1. Edit `src/main/resources/com/keenwrite/messages.properties`.
1. Set `Wizard.typesetter.container.version` to the new executable version.
1. Set `Wizard.typesetter.container.checksum` to the Windows version checksum.
1. Set `Wizard.typesetter.container.image.version` to the new image version.
1. Save the file.

The containerization software version is changed.

# Publish

Building the container will pull from the container version in the properties
file. Ensure that a personal access token (`token.txt`) exists, then publish
the changes to the container image as follows:

``` bash
./manage.sh --verbose --delete --build --export --publish
```

The container image is published.