Skip to content

Commit 30e99c2

Browse files
committed
📝 for staged rollouts
1 parent e7aaab5 commit 30e99c2

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

docs/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ The **[Getting Started Guide](getting-started/0-overview.md)** provides a step-b
5050
* [Update Manager](using/update-manager.md) - reference guide for the `UpdateManager`.
5151
* [GitHub](using/github.md) - overview of using GitHub for installing, distributing, and updating.
5252
* [Debugging Updates](using/debugging-updates.md) - tips for debugging Squirrel.Windows updates.
53+
* [Staged Rollouts](using/staged-rollouts.md) - how to use staged rollouts to ramp up install distribution over time
5354

5455

5556
## Contributing

docs/using/staged-rollouts.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
| [docs](..) / [using](.) / staged-rollouts.md
2+
|:---|
3+
4+
# Staged Rollouts
5+
6+
Staged rollouts allow you to distribute the latest version of your app to a subset of users that you can increase over time, similar to rollouts on platforms like Google Play. This feature requires Squirrel.Windows 1.4.0 or above.
7+
8+
### How to use
9+
10+
Staged rollouts are controlled by manually editing your `RELEASES` file. Here's an example:
11+
12+
~~~
13+
e3f67244e4166a65310c816221a12685c83f8e6f myapp-1.0.0-full.nupkg 600725
14+
~~~
15+
16+
Now let's ship a new version to 10% of our userbase.
17+
18+
```
19+
e3f67244e4166a65310c816221a12685c83f8e6f myapp-1.0.0-full.nupkg 600725
20+
0d777ea94c612e8bf1ea7379164caefba6e24463 myapp-1.0.1-delta.nupkg 6030# 10%
21+
85f4d657f8424dd437d1b33cc4511ea7ad86b1a7 myapp-1.0.1-full.nupkg 600752# 10%
22+
```
23+
24+
Note that the syntax is `# nn%` - due to a bug in earlier versions of Squirrel.Windows, for now, you *must* put the `#` immediately following the file size, no spaces. Once all of your users have Squirrel 1.4.0 or higher, you can add a space after the `#` (similar to a comment).
25+
26+
Assuming that this rollout is going well, at some point you can upload a new version of the releases file:
27+
28+
```
29+
e3f67244e4166a65310c816221a12685c83f8e6f myapp-1.0.0-full.nupkg 600725
30+
0d777ea94c612e8bf1ea7379164caefba6e24463 myapp-1.0.1-delta.nupkg 6030# 50%
31+
85f4d657f8424dd437d1b33cc4511ea7ad86b1a7 myapp-1.0.1-full.nupkg 600752# 50%
32+
```
33+
34+
When you're confident that this release has gone successfully, you can remove the comment so that 100% of users get the file:
35+
36+
```
37+
e3f67244e4166a65310c816221a12685c83f8e6f myapp-1.0.0-full.nupkg 600725
38+
0d777ea94c612e8bf1ea7379164caefba6e24463 myapp-1.0.1-delta.nupkg 6030
39+
85f4d657f8424dd437d1b33cc4511ea7ad86b1a7 myapp-1.0.1-full.nupkg 600752
40+
```
41+
42+
### Handling failed rollouts
43+
44+
If you want to pull a staged release because it hasn't gone well, you should hand-edit the RELEASES file to completely remove the bad version:
45+
46+
~~~
47+
e3f67244e4166a65310c816221a12685c83f8e6f myapp-1.0.0-full.nupkg 600725
48+
~~~
49+
50+
Once you do this, you **must** increment the version number higher than your broken release (in this example, we would need to release MyApp 1.0.2). Because some of your users will be on the broken 1.0.1, releasing a _new_ 1.0.1 would result in them staying on a broken version.

0 commit comments

Comments
 (0)