Skip to content
Shannon Skinner edited this page Oct 14, 2015 · 28 revisions

The LIC.Malone.Client.Desktop.Packager project automates the steps for Squirrel.

Pre-Packager

Before running it up (it's a Console app), ensure that LIC.Malone.Client.Desktop.Packager\build\Releases is empty. See #74.

Package that bad boy up

Just run the console app.

Post-Packager

Test

Note: Previously when using the UpdateManager we could switch the update URL to the local releases folder to test updates work. After moving to GitHubUpdateManager we don't have that ability any more. See #75.

Canary/Pre-release

  1. Create a new release in GitHub.
  2. Ensure it is marked as pre-release!
  3. Attach the files to the release:
  4. *-full.nupkg
  5. RELEASES
  6. Setup-*.exe
  7. Ensure you have the previous version installed.
  8. Ensure the IsCanary setting in Malone.exe.config is true to include pre-releases.
  9. Run and verify that it updates (follow the prompt to restart).

Because updates are actually the complete app at a specific version installed side-by-side (including the config), the IsCanary setting will be defaulted back to false for the newly installed version. In which case it will only find the last stable release, but will stay on the pre-release version if it is a later version.

Canary died

If testing fails, you have two options:

  1. Delete the release from GitHub (the tag will remain).
  2. Roll-forward with further canary releases to fix the problem.

Stable release

Once a canary release has passed testing, it's a simple matter of removing the pre-release tag in GitHub to make it generally available for everyone.

  1. Ensure you have the previous version installed.
  2. Ensure the IsCanary setting in Malone.exe.config is false to only get stable releases.
  3. Run and verify that it updates (follow the prompt to restart).

Stable died

If testing fails, you have two options:

  1. Delete the release from GitHub (the tag will remain).
  2. Re-add the pre-release tag to hide it from non-canary users.

Historical notes

Previous to v0.7.2, we were using a version of Squirrel that only had an UpdateManager. That used a local or remote folder of releases (both full and delta packages), with a single RELEASES file containing a full history.

After moving to a later version of Squirrel, we switched over to using the GitHubUpdateManager to support updates direct from GitHub releases. At the time of writing (October 2015), this no longer supports delta updates which is pretty dumb. See Squirrel/Squirrel.Windows#465.

The following step is kept for historical purposes and in case GitHubUpdateManager is updated to support deltas.

Pre-Packager

Before running it up (it's a Console app), ensure that you have the following in LIC.Malone.Client.Desktop.Packager\build\Releases:

  1. The last *-full.nupkg, so that a delta package can be made to the latest release.
  2. The full RELEASES file, so that the hashes for the latest files (delta and full) can be appended.

Post-Packager

Test

The RELEASES file should be append only: no modifications, so no changing of hashes! Test locally first to avoid blowing out the live feed with updates.

Local update

  1. Ensure you have the previous version installed.
  2. Modify the UpdateUrl in Malone.exe.config to point to your local LIC.Malone.Client.Desktop.Packager\build\Releases folder.
  3. Run and verify that it updates (follow the prompt to restart).

Because the update will be using a new copy of the config, it should point once again to the remote server. In which case it might be trying to up/downgrade to the previous version if you haven't pushed the latest version live yet. That's okay. It's just that Squirrel identifies that your version is different from what the remote feed says it is and tries to update.

Remote update

Upload the following:

  1. Latest *-delta.nupkg.
  2. Latest *-full.nupkg.
  3. RELEASES.

... then:

  1. Ensure you have the previous version installed.
  2. Run and verify that it updates (follow the prompt to restart).