Notes for maintainers
=====================

Incorporating binaries from the Steam client
--------------------------------------------

The bootstrap tarball contains a small subset of the Steam client.
It is not maintained in this repository, and is ignored by our .gitignore.

To fetch it, run buildutils/add-client-files.py. By default, it will
download files from the latest public general-availability Steam client.
There are many options: run buildutils/add-client-files.py --help for
an up-to-date list.

Use --client-manifest=steam_client_publicbeta_ubuntu12 if you would prefer
to update the bootstrapper from the latest public beta Steam client.

--client-dir=/path/to/client (or --client-dir=/path/to/.steam/steam) gets
the client files directly from a Steam client installation.

--client-tarball-uri gets the client files from a tarball, which must
have a top-level directory (its name is ignored) containing filenames
like `steam.sh` and `ubuntu12_32`, for example:

    client-2020-02-24/
        steam.sh
        ubuntu12_32/
            steam
            steam-runtime.tar.xz.part0
            ...
        ...

(For details of the minimal files that must be present in the tarball,
see the source code!)

You can specify an option like --runtime-version=0.20200204.0 to delete the
Steam Runtime from the client and replace it with a suitable Steam Runtime
before packing the bootstrap tarball. In particular, you must provide this
option if the runtime is missing from your client.

Updating subprojects
--------------------

To update the udev rules from steam-devices:

    # only necessary the first time
    git remote add --no-tags steam-devices https://github.com/ValveSoftware/steam-devices
    # merge the upstream changes into our subtree
    git subtree merge -P subprojects/steam-devices steam-devices/master
    # review the changes
    git diff HEAD~

Updating PGP keys
-----------------

Historically `steam.gpg` was regenerated with:

    gpg \
    --homedir=$(CURDIR)/gpg \
    --no-default-keyring \
    --keyring=$(CURDIR)/steam.gpg \
    --import steam-key.asc

but that's probably only valid for GPG v1. In future (if we generate
new keys or uids, or update revocation dates) it would be better to use:

    gpg --export-options export-clean,export-minimal --export KEYIDS... > steam.gpg
    gpg --armor --export-options export-clean,export-minimal --export KEYIDS... > steam-key.asc

on a machine that holds the canonical version of the keys.

Preparing a beta release
------------------------

* Check that the diff is appropriate

* Download the prerelease package produced by Gitlab-CI (each commit
    to git master generates a package in the `playground/steam-launcher`
    beta suite), and test it on whatever distributions are appropriate

* Update `debian/changelog` to include all the latest changes, if not
    already done (`gbp dch --full` from the `git-buildpackage` package
    might help)

* Finalize the first line of the changelog, and the following
    "sign-off" line starting with ` --`
    (`debchange -r` from the `devscripts` package might help)

* Update the `STEAMSCRIPT_VERSION` in `bin_steam.sh`

* Add a `<release>` in `com.valvesoftware.Steam.metainfo.xml`, preserving
    newest-first order

* Commit the changes

* `git tag -m 'steam-launcher vX.Y.Z.W' -a vX.Y.Z.W`

* `git push origin master vX.Y.Z.W`

* If all goes well, the new release will be built automatically from the
    `vX.Y.Z.W` tag by Gitlab-CI, and go into the internal staging apt
    repository (`steam-launcher` beta suite).

* Last chance to test! If there's a problem, fix it and start again with
    a new version number.

* Trigger the internal `precise/promote-apt/public` CI job, which promotes
    the staging apt repository to public status.

Putting a beta release into production
--------------------------------------

* Trigger the internal `precise/promote-apt/staging-stable` CI job

* *Really* the last chance to test :-)

* Trigger the internal `precise/promote-apt/public` CI job
