Skip to content

Commit 8f88aa6

Browse files
committed
Adjust release procedure to produce correct tester and nightly build version precedence
On every startup, the Arduino IDE checks for new versions of the IDE. If a newer version is available, a notification/dialog is shown offering an update. "Newer" is determined by comparing the version of the user's IDE to the latest available version on the update channel. This comparison is done according to the Semantic Versioning Specification ("SemVer"). In order to facilitate beta testing, builds are generated of the Arduino IDE at the current stage in development. These builds are given an identifying version of the following form: - <version>-snapshot-<short hash> - builds generated for every push and pull request that modifies relevant files - <version>-nightly-<YYYYMMDD> - daily builds of the tip of the default branch The previous release procedure caused the <version> component of these to be the version of the most recent release. During the pre-release phase of the project development, all releases had a pre-release suffix (e.g., 2.0.0-rc9.4). Appending the "snapshot" or "nightly" suffix to that pre-release version caused these builds to have the correct precedence (e.g., 2.0.0-rc9.2.snapshot-20cc34c > 2.0.0-rc9.2). This situation has changed now that the project is using production release versions (e.g., 2.0.0-nightly-20220915 < 2.0.0). This caused users of "snapshot" or "nightly" builds to be presented with a spurious update notification on startup. The solution is to add a step to the end of the release procedure to do a minor bump of the version metadata after creating the release tag. This means that the metadata bump traditionally done before the creation of the release tag will already have been done in advance for patch releases. However, it will still need to be done for minor or major releases. The release procedure documentation is hereby updated to produce correct tester and nightly build version precedence. The metadata bump step is moved from before to after the tag creation step, replaced by a new step to verify the version before the tag creation, updating it in the event it is not a patch release. Both those steps may require updating the metadata. As an alternative to maintaining duplicate copies, each step links to a single copy of the fairly complex instructions for doing so. The structure of the document is adjusted to accomodate this, by placing the steps of the procedure under a "Steps" section and creating a new "Operations" section to contain any such shared content.
1 parent 3c2b2a0 commit 8f88aa6

File tree

1 file changed

+51
-18
lines changed

1 file changed

+51
-18
lines changed

Diff for: docs/internal/release-procedure.md

+51-18
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Release Procedure
22

3-
## 1. 🗺️ Merge localization sync PR
3+
## Steps
4+
5+
The following are the steps to follow to make a release of Arduino IDE:
6+
7+
### 1. 🗺️ Merge localization sync PR
48

59
A pull request titled "**Update translation files**" is submitted periodically by the "**github-actions**" bot to pull in the localization data from [**Transifex**](https://www.transifex.com/arduino-1/ide2/dashboard/).
610

@@ -10,26 +14,24 @@ It will be shown in these search results:
1014

1115
https://github.com/arduino/arduino-ide/pulls/app%2Fgithub-actions
1216

13-
## 2. ⚙ Update metadata of packages
17+
### 2. 👀 Check version of packages
1418

15-
You need to **set the new version in all the `package.json` files** across the app (`./package.json`, `./arduino-ide-extension/package.json`, and `./electron-app/package.json`), create a PR, and merge it on the `main` branch.
19+
The [`version` field](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#version) of the project's `package.json` metadata files received a patch version bump (e.g., `2.0.1` -> `2.0.2`) at the time of the previous release.
1620

17-
To do so, you can make use of the `update:version` script.
21+
If this is a patch release, the current metadata values are correct and no action is needed.
1822

19-
For example, if you want to release the version `<YOUR_VERSION>`, you should run the following commands:
23+
The changes contained in this release might be considered to change the project's "API". If so, a patch version bump will not be appropriate and the version must be adjusted in compliance with the [**Semantic Versioning Specification**](https://semver.org/).
2024

21-
```text
22-
git checkout main
23-
git pull
24-
git checkout -b version-<YOUR_VERSION>
25-
yarn update:version <YOUR_VERSION>
26-
git commit -am <YOUR_VERSION>
27-
git push origin version-<YOUR_VERSION>
28-
```
25+
Follow the instructions for updating the version metadata [**here**](#update-version-metadata).
26+
27+
#### Examples
28+
29+
If the version number of the previous release was `2.0.1`:
2930

30-
replacing `<YOUR_VERSION>` with the version you want to release. Then create a PR and merge it.
31+
- If this is considered a minor release (non-breaking changes to the "API"), the `version` values must be changed to `2.1.0`.
32+
- If this is considered a major release (breaking changes to the "API"), the `version` values must be changed to `3.0.0`.
3133

32-
## 3. 🚢 Create the release on GitHub
34+
### 3. 🚢 Create the release on GitHub
3335

3436
Then, you need to **create and push the new tag** and wait for the release to appear on [the "**Releases**" page](https://github.com/arduino/arduino-ide/releases).
3537

@@ -44,7 +46,13 @@ git push origin <YOUR_VERSION>
4446

4547
Pushing a tag will trigger a **GitHub Actions** workflow on the `main` branch. Check the "**Arduino IDE**" workflow and see that everything goes right. If the workflow succeeds, a new release will be created automatically and you should see it on the ["**Releases**"](https://github.com/arduino/arduino-ide/releases) page.
4648

47-
## 4. 📄 Create the changelog
49+
### 4. ⬆️ Bump version metadata of packages
50+
51+
In order for the version number of the tester and nightly builds to have correct precedence compared to the release version, the `version` field of the project's `package.json` files must be given a patch version bump (e.g., `2.0.1` -> `2.0.2`) **after** the creation of the release tag.
52+
53+
Follow the instructions for updating the version metadata [**here**](#update-version-metadata).
54+
55+
### 5. 📄 Create the changelog
4856

4957
**Create GitHub issues for the known issues** that we haven't solved in the current release:
5058

@@ -63,7 +71,7 @@ Add a list of mentions of GitHub users who contributed to the release in any of
6371

6472
Add a "**Known Issues**" section at the bottom of the changelog.
6573

66-
## 5. ✎ Update the "**Software**" Page
74+
### 6. ✎ Update the "**Software**" Page
6775

6876
Open a PR on the [bcmi-labs/wiki-content](https://github.com/bcmi-labs/wiki-content) repository to update the links and texts.
6977

@@ -80,7 +88,7 @@ When the deploy workflow is done, check if links on the "**Software**" page are
8088

8189
https://www.arduino.cc/en/software#future-version-of-the-arduino-ide
8290

83-
## 6. 😎 Brag about it
91+
### 7. 😎 Brag about it
8492

8593
- Ask in the `#product_releases` **Slack** channel to write a post for the social media and, if needed, a blog post.
8694
- Post a message on the forum (ask @per1234).<br />
@@ -99,3 +107,28 @@ https://www.arduino.cc/en/software#future-version-of-the-arduino-ide
99107
>
100108
> To see the details, you can take a look at the [Changelog](https://github.com/arduino/arduino-ide/releases/tag/2.0.0-beta.12)
101109
> If you want to post about it on social media and you need more details feel free to ask us on #team_tooling! :wink:
110+
111+
## Operations
112+
113+
The following are detailed descriptions of operations performed during the release process:
114+
115+
<a id="update-version-metadata"></a>
116+
117+
### ⚙ Update version metadata of packages
118+
119+
You need to **set the new version in all the `package.json` files** across the app (`./package.json`, `./arduino-ide-extension/package.json`, and `./electron-app/package.json`), create a PR, and merge it on the `main` branch.
120+
121+
To do so, you can make use of the `update:version` script.
122+
123+
For example, if you want to update the version to `<YOUR_VERSION>`, you should run the following commands:
124+
125+
```text
126+
git checkout main
127+
git pull
128+
git checkout -b version-<YOUR_VERSION>
129+
yarn update:version <YOUR_VERSION>
130+
git commit -am <YOUR_VERSION>
131+
git push origin version-<YOUR_VERSION>
132+
```
133+
134+
replacing `<YOUR_VERSION>` with the version you want. Then create a PR and merge it.

0 commit comments

Comments
 (0)