Skip to content

Commit 6722972

Browse files
author
Akos Kitta
committed
fix: macos clone+build
ran prettier on the readme
1 parent 24b0212 commit 6722972

File tree

1 file changed

+121
-103
lines changed

1 file changed

+121
-103
lines changed

docs/internal/release-procedure.md

Lines changed: 121 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -180,122 +180,140 @@ replacing `<YOUR_VERSION>` with the version you want. Then create a PR and merge
180180
Creating the release for Ubuntu 18.04 ([arduino/arduino-ide#2018](https://github.com/arduino/arduino-ide/issues/2018)) and macOS M1 ([arduino/arduino-ide#408](https://github.com/arduino/arduino-ide/issues/408)) is a manual procedure.
181181

182182
### Ubuntu 18.04
183-
- Prerequisites:
184-
- Ask the DevOps team for an EC2 instance with at least 8 GB of RAM.
185-
- Your account must have access to the staging AWS environment.
186-
- You have VPN connection to staging.
187-
- Setup:
188-
- To install all required dependencies, run the following script:
189-
```sh
190-
sudo apt update \
191-
&& sudo apt install --no-install-recommends --yes \
192-
git \
193-
gcc \
194-
curl \
195-
make \
196-
python \
197-
pkg-config \
198-
libx11-dev \
199-
libxkbfile-dev \
200-
build-essential \
201-
libsecret-1-dev \
202-
&& wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash \
203-
&& source ~/.bashrc \
204-
&& nvm install 16 \
205-
&& nvm use 16 \
206-
&& nvm alias default 16 \
207-
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - \
208-
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list \
209-
&& sudo apt update && sudo apt install --no-install-recommends yarn
210-
```
211-
- Set the environment variables to mimic a CI build:
212-
```sh
213-
export IS_RELEASE=true && export CI=true
214-
```
215-
- Build:
183+
184+
- Prerequisites:
185+
- Ask the DevOps team for an EC2 instance with at least 8 GB of RAM.
186+
- Your account must have access to the staging AWS environment.
187+
- You have VPN connection to staging.
188+
- Setup:
189+
- To install all required dependencies, run the following script:
216190
```sh
217-
yarn --cwd ./electron/packager && yarn --cwd ./electron/packager package
191+
sudo apt update \
192+
&& sudo apt install --no-install-recommends --yes \
193+
git \
194+
gcc \
195+
curl \
196+
make \
197+
python \
198+
pkg-config \
199+
libx11-dev \
200+
libxkbfile-dev \
201+
build-essential \
202+
libsecret-1-dev \
203+
&& wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash \
204+
&& source ~/.bashrc \
205+
&& nvm install 16 \
206+
&& nvm use 16 \
207+
&& nvm alias default 16 \
208+
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - \
209+
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list \
210+
&& sudo apt update && sudo apt install --no-install-recommends yarn
218211
```
219-
- Artifacts:
220-
- You have to upload the following artifacts from `./arduino-ide/electron/build/dist` to S3:
221-
- `arduino-ide_${VERSION}_Linux_64bit.AppImage`,
222-
- `arduino-ide_${VERSION}_Linux_64bit.zip`, and
223-
- `stable-linux.yml`
224-
225-
### macOS M1
226-
- Prerequisites:
227-
- You need access to the shared Mac Mini at Toolbox. Use TeamViewer.
228-
- You have access to the `FT Web Tooling` 1Password vault.
229-
- Setup:
230-
- Download the `Pro-IDE-Certificates.p12` file from the `Arduino Pro IDE Apple Developer ID Certificate .p12 format` 1Password vault item and put it somewhere on the Mac Mini. This example assumes you put the `.p12` file in the `arduino-ide` repository root, and your `cwd` is also in the `arduino-ide` repository root.
231-
- The following environment variables must be available from the shell:
232-
- `AC_PASSWORD`: From the `Arduino Apple developer ID App Specific Password` 1Password vault item
233-
- `AC_USERNAME`: From the `Arduino Apple developer ID App Specific Password` 1Password vault item
234-
- `AC_TEAM_ID`: "KT7ZWMCJT"
235-
- `CSC_KEY_PASSWORD`: from the `Arduino Pro IDE Apple Developer ID certificate keychain password` 1Password vault item
236-
- `CSC_LINK`: Path to the `Pro-IDE-Certificates.p12` file on the Mac Mini
237-
- `IS_RELEASE`: "true"
238-
- `CAN_SIGN`: "true"
239-
- `MACOS_FORCE_NOTARIZE`: "true"
240-
241-
```sh
242-
export AC_PASSWORD="***"
243-
export AC_USERNAME="***"
244-
export AC_TEAM_ID="7KT7ZWMCJT"
245-
export CSC_KEY_PASSWORD="***"
246-
export CSC_LINK="`pwd`/Pro-IDE-Certificates.p12"
247-
export IS_RELEASE="true"
248-
export CAN_SIGN="true"
249-
export MACOS_FORCE_NOTARIZE="true"
250-
export CI="true"
251-
```
252-
253-
- Build:
212+
- Set the environment variables to mimic a CI build:
254213
```sh
255-
yarn --cwd ./electron/packager && yarn --cwd ./electron/packager package
214+
export IS_RELEASE=true && export CI=true
256215
```
216+
- Build:
217+
```sh
218+
yarn --cwd ./electron/packager && yarn --cwd ./electron/packager package
219+
```
220+
- Artifacts:
221+
- You have to upload the following artifacts from `./arduino-ide/electron/build/dist` to S3:
222+
- `arduino-ide_${VERSION}_Linux_64bit.AppImage`,
223+
- `arduino-ide_${VERSION}_Linux_64bit.zip`, and
224+
- `stable-linux.yml`
225+
226+
### macOS M1
227+
228+
- Prerequisites:
229+
230+
- You need access to the shared Mac Mini at Toolbox. Use TeamViewer.
231+
- You have access to the `FT Web Tooling` 1Password vault.
232+
233+
- Clone:
234+
235+
```sh
236+
BRANCH="<TODO: release branch name>"
237+
git clone --single-branch --branch $BRANCH https://github.com/arduino/arduino-ide.git
238+
```
239+
240+
- Setup:
257241

258-
- Verify:
242+
- Download the `Pro-IDE-Certificates.p12` file from the `Arduino Pro IDE Apple Developer ID Certificate .p12 format` 1Password vault item and put it somewhere on the Mac Mini. This example assumes you put the `.p12` file in the `arduino-ide` repository root, and your `cwd` is also in the `arduino-ide` repository root.
243+
- The following environment variables must be available from the shell:
259244

260-
Since you cannot drag and drop via TeamViewer, you will install the app from a command line. This example puts the IDE2 into the Desktop. Do **NOT** try to bypass the installation with a double click and open from the UI. The `node_modules` folder of the source code is implicitly in the `$PATH`, and you want to verify if the app is fully functional without the `node_modules` folder.
245+
- `AC_PASSWORD`: From the `Arduino Apple developer ID App Specific Password` 1Password vault item
246+
- `AC_USERNAME`: From the `Arduino Apple developer ID App Specific Password` 1Password vault item
247+
- `AC_TEAM_ID`: "KT7ZWMCJT"
248+
- `CSC_KEY_PASSWORD`: from the `Arduino Pro IDE Apple Developer ID certificate keychain password` 1Password vault item
249+
- `CSC_LINK`: Path to the `Pro-IDE-Certificates.p12` file on the Mac Mini
250+
- `IS_RELEASE`: "true"
251+
- `CAN_SIGN`: "true"
252+
- `MACOS_FORCE_NOTARIZE`: "true"
261253

262254
```sh
263-
VERSION="<TODO: release version>"
264-
&& hdiutil attach ./electron/build/dist/arduino-ide_${VERSION}_macOS_ARM64.dmg \
265-
&& cp -R /Volumes/Arduino\ IDE\ ${VERSION}-arm64/Arduino\ IDE.app ~/Desktop \
266-
&& hdiutil unmount /Volumes/Arduino\ IDE\ ${VERSION}-arm64 \
267-
&& codesign -dv --verbose=4 ~/Desktop/Arduino\ IDE.app \
268-
&& ~/Desktop/Arduino\ IDE.app/Contents/MacOS/Arduino\ IDE
255+
export AC_PASSWORD="***"
256+
export AC_USERNAME="***"
257+
export AC_TEAM_ID="7KT7ZWMCJT"
258+
export CSC_KEY_PASSWORD="***"
259+
export CSC_LINK="`pwd`/Pro-IDE-Certificates.p12"
260+
export IS_RELEASE="true"
261+
export CAN_SIGN="true"
262+
export MACOS_FORCE_NOTARIZE="true"
263+
export CI="true"
269264
```
270265

271-
- Cleanup:
272-
- You **MUST** close the shell after the build.
273-
- You **MUST** delete the `.p12` file and empty the trash afterward.
274-
275-
- Artifacts:
276-
- You have to upload the following artifacts from `./arduino-ide/electron/build/dist` to S3, but first, you must create the final channel file from the `latest-mac.yaml`:
277-
- `arduino-ide_${VERSION}_macOS_arm64.dmg`,
278-
- `arduino-ide_${VERSION}_macOS_arm64.zip`, and
279-
- `stable-mac.yml`
280-
- To create the final channel file, do the followings:
281-
- Copy the `stable-mac.yml` file from the Mac Mini to a folder and rename it to `stable-mac-ARM64.yml`.
282-
- Download the `stable-mac.yaml` produced by GitHub Actions from the latest release, rename it to `stable-mac-X64.yml`, and put it in the same folder where you put the file from the Mac Mini.
283-
- Run the channel file merger:
284-
```sh
285-
node ./scripts/merge-channel-files.js ./path/to/folder/with/channel/files
286-
```
287-
- You have the merged channel file that you need to upload to S3.
266+
- Build:
267+
268+
```sh
269+
./scripts/package.sh
270+
```
271+
272+
> Make sure to change directory, and execute the script from the root of the `arduino-ide` repository.
273+
274+
- Verify:
275+
276+
Since you cannot drag and drop via TeamViewer, you will install the app from a command line. This example puts the IDE2 into the Desktop. Do **NOT** try to bypass the installation with a double click and open from the UI. The `node_modules` folder of the source code is implicitly in the `$PATH`, and you want to verify if the app is fully functional without the `node_modules` folder.
277+
278+
```sh
279+
VERSION="<TODO: release version>"
280+
hdiutil attach ./electron/build/dist/arduino-ide_$VERSION_macOS_ARM64.dmg \
281+
&& cp -R /Volumes/Arduino\ IDE\ $VERSION-arm64/Arduino\ IDE.app ~/Desktop \
282+
&& hdiutil unmount /Volumes/Arduino\ IDE\ $VERSION-arm64 \
283+
&& codesign -dv --verbose=4 ~/Desktop/Arduino\ IDE.app \
284+
&& ~/Desktop/Arduino\ IDE.app/Contents/MacOS/Arduino\ IDE
285+
```
286+
287+
- Cleanup:
288+
289+
- You **MUST** close the shell after the build.
290+
- You **MUST** delete the `.p12` file and empty the trash afterward.
291+
292+
- Artifacts:
293+
- You have to upload the following artifacts from `./arduino-ide/electron/build/dist` to S3, but first, you must create the final channel file from the `latest-mac.yaml`:
294+
- `arduino-ide_${VERSION}_macOS_arm64.dmg`,
295+
- `arduino-ide_${VERSION}_macOS_arm64.zip`, and
296+
- `stable-mac.yml`
297+
- To create the final channel file, do the followings:
298+
- Copy the `stable-mac.yml` file from the Mac Mini to a folder and rename it to `stable-mac-ARM64.yml`.
299+
- Download the `stable-mac.yaml` produced by GitHub Actions from the latest release, rename it to `stable-mac-X64.yml`, and put it in the same folder where you put the file from the Mac Mini.
300+
- Run the channel file merger:
301+
```sh
302+
node ./scripts/merge-channel-files.js ./path/to/folder/with/channel/files
303+
```
304+
- You have the merged channel file that you need to upload to S3.
288305

289306
### FAQ
290-
- Q: I see no `stable` channel files, only `latest`.
291-
- A: You forgot to set the `CI=true` environment variable.
292307

293-
----
308+
- Q: I see no `stable` channel files, only `latest`.
309+
- A: You forgot to set the `CI=true` environment variable.
310+
311+
---
294312

295-
- Q: How to connect to the EC2 instance?
296-
- A: DevOps will give you a temporary link to the private key. Create a file `username_ip.pem` in your cwd, copy the private key into the file, open a shell, and execute `ssh -i "username_ip.pem" username@ip`. DevOps will tell you the `username` and the `ip`. Do not forget the VPN.
313+
- Q: How to connect to the EC2 instance?
314+
- A: DevOps will give you a temporary link to the private key. Create a file `username_ip.pem` in your cwd, copy the private key into the file, open a shell, and execute `ssh -i "username_ip.pem" username@ip`. DevOps will tell you the `username` and the `ip`. Do not forget the VPN.
297315

298-
----
316+
---
299317

300-
- Q: How to download the files from the EC2 instance?
301-
- A: `scp -i username_ip.pem username@ip:/path/to/build/artifact /local/dir`.
318+
- Q: How to download the files from the EC2 instance?
319+
- A: `scp -i username_ip.pem username@ip:/path/to/build/artifact /local/dir`.

0 commit comments

Comments
 (0)