Skip to content

Bump version metadata to produce correct tester and nightly build precedence #1492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ contact_links:
url: https://forum.arduino.cc/
about: We can help you out on the Arduino Forum!
- name: Issue report guide
url: https://github.com/arduino/arduino-ide/blob/main/docs/issues.md#issue-report-guide
url: https://github.com/arduino/arduino-ide/blob/main/docs/contributor-guide/issues.md#issue-report-guide
about: Learn about submitting issue reports to this repository.
- name: Contributor guide
url: https://github.com/arduino/arduino-ide/blob/main/docs/CONTRIBUTING.md#contributor-guide
Expand Down
2 changes: 1 addition & 1 deletion arduino-ide-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arduino-ide-extension",
"version": "2.0.0",
"version": "2.0.1",
"description": "An extension for Theia building the Arduino IDE",
"license": "AGPL-3.0-or-later",
"scripts": {
Expand Down
69 changes: 52 additions & 17 deletions docs/internal/release-procedure.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Release Procedure

## 🗺️ Merge localization sync PR
## Steps

The following are the steps to follow to make a release of Arduino IDE:

### 1. 🗺️ Merge localization sync PR

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/).

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

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

## ⚙ Create the release on GitHub
### 2. 👀 Check version of packages

First of all, 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.
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.

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

For example, if you want to release the version `<YOUR_VERSION>`, you should run the following commands:
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/).

```text
git checkout main
git pull
git checkout -b version-<YOUR_VERSION>
yarn update:version <YOUR_VERSION>
git commit -am <YOUR_VERSION>
git push origin version-<YOUR_VERSION>
```
Follow the instructions for updating the version metadata [**here**](#update-version-metadata).

#### Examples

If the version number of the previous release was `2.0.1`:

- If this is considered a minor release (non-breaking changes to the "API"), the `version` values must be changed to `2.1.0`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDE2 never followed semver, and does not expose any public APIs, but we can leave this in the doc. In the end, the desired version is a marketing-only thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice that I put "API" in quotes. The spirit of SemVer can still be applied even to projects which don't have a traditional API. The idea of SemVer is that the version number conveys meaning to the users. It is an unfortunate fact that version numbers are sometimes manipulated for marketing purposes, but this is documentation for maintainers, not marketers.

Most often, the choice of version number will be at the discretion of the maintainer and that maintainer should base the choice purely on technical considerations.

- If this is considered a major release (breaking changes to the "API"), the `version` values must be changed to `3.0.0`.

replacing `<YOUR_VERSION>` with the version you want to release. Then create a PR and merge it.
### 3. 🚢 Create the release on GitHub

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).

Expand All @@ -42,7 +46,13 @@ git push origin <YOUR_VERSION>

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.

## 📄 Create the changelog
### 4. ⬆️ Bump version metadata of packages

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the long run, we should use yarn to generate these pre-release version numbers instead of manually bumping them. Once this is merged, I will create a follow-up with the request.

Ref: https://classic.yarnpkg.com/en/docs/cli/version/#toc-yarn-version-prerelease


Follow the instructions for updating the version metadata [**here**](#update-version-metadata).

### 5. 📄 Create the changelog

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

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

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

## ✎ Update the "**Software**" Page
### 6. ✎ Update the "**Software**" Page

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

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

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

## 😎 Brag about it
### 7. 😎 Brag about it

- Ask in the `#product_releases` **Slack** channel to write a post for the social media and, if needed, a blog post.
- Post a message on the forum (ask @per1234).<br />
Expand All @@ -97,3 +107,28 @@ https://www.arduino.cc/en/software#future-version-of-the-arduino-ide
>
> 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)
> If you want to post about it on social media and you need more details feel free to ask us on #team_tooling! :wink:

## Operations

The following are detailed descriptions of operations performed during the release process:

<a id="update-version-metadata"></a>

### ⚙ Update version metadata of packages

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.

To do so, you can make use of the `update:version` script.

For example, if you want to update the version to `<YOUR_VERSION>`, you should run the following commands:

```text
git checkout main
git pull
git checkout -b version-<YOUR_VERSION>
yarn update:version <YOUR_VERSION>
git commit -am <YOUR_VERSION>
git push origin version-<YOUR_VERSION>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming you have set the remote to origin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request only moved the existing content from one place in the document to another.

```

replacing `<YOUR_VERSION>` with the version you want. Then create a PR and merge it.
4 changes: 2 additions & 2 deletions electron-app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "electron-app",
"version": "2.0.0",
"version": "2.0.1",
"license": "AGPL-3.0-or-later",
"main": "src-gen/frontend/electron-main.js",
"dependencies": {
Expand All @@ -21,7 +21,7 @@
"@theia/process": "1.25.0",
"@theia/terminal": "1.25.0",
"@theia/workspace": "1.25.0",
"arduino-ide-extension": "2.0.0"
"arduino-ide-extension": "2.0.1"
},
"devDependencies": {
"@theia/cli": "1.25.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arduino-ide",
"version": "2.0.0",
"version": "2.0.1",
"description": "Arduino IDE",
"repository": "https://github.com/arduino/arduino-ide.git",
"author": "Arduino SA",
Expand Down