Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
381c370
fix: move feature flag component into a separate file
yougotwill Feb 10, 2025
a138b26
feat: added release channel toggle to debug menu
yougotwill Feb 11, 2025
386df39
feat: include architecture in release version request
yougotwill Feb 11, 2025
bd5e0c8
feat: include release channel in release version request
yougotwill Feb 11, 2025
3f292f8
feat: added os arch and release channel to desktop update requests to…
yougotwill Feb 14, 2025
0295bfe
feat: added alpha release check to debug menu
yougotwill Feb 16, 2025
00df156
fix: make sure debug latest release always uses latest channel
yougotwill Feb 17, 2025
99bd96d
fix: make sure to use updater prefix in all appropriate places
yougotwill Feb 17, 2025
5c664d3
feat: added current version to release check buttons
yougotwill Feb 17, 2025
77f1e53
fix: split up toasts for available and current release when debugging
yougotwill Feb 17, 2025
0b3dc3e
fix: updated semver package to fix prerelease comparison
yougotwill Feb 17, 2025
f2e11cc
feat: added gh actions support for publishing alpha releases
yougotwill Feb 19, 2025
2c4a141
feat: getLatestReleaseFromFileServer also returns the current release…
yougotwill Feb 19, 2025
31d5f27
fix: added logging for update download progress and completion
yougotwill Feb 19, 2025
72ef729
feat: added generateUpdatesFilesForAllChannels to electorn builder co…
yougotwill Feb 19, 2025
32ccee1
feat: set autoupdater to allow prereleases and downgrading if we are …
yougotwill Feb 19, 2025
2dac9bc
fix: only call quit and install after update downloaded event
yougotwill Feb 19, 2025
b352136
fix: try to catch UPDATE_DOWNLOADED event
yougotwill Feb 19, 2025
102b40c
fix: cleaned up debug release button logging
yougotwill Feb 19, 2025
382afe5
fix: updated progress download logging
yougotwill Feb 19, 2025
e57a230
feat: fixed auto update restart
yougotwill Feb 19, 2025
87906a2
feat: default to latest release channel if we dont have it set
yougotwill Mar 5, 2025
1d3f071
refactor: revert app restart behaviour after an update is downloaded
yougotwill Mar 7, 2025
05b2d93
feat: change ui label for latest channel to stable
yougotwill Mar 7, 2025
93ccd55
fix: include version in update notification message
yougotwill Mar 7, 2025
739db81
fix: remove unneeded params for file server request
yougotwill Mar 17, 2025
00f184d
refactor: extract changeReleaseChannel function and pass dispatch and…
yougotwill Mar 20, 2025
9024c9c
chore: remove TODO comment regarding publish condition in build-binar…
yougotwill Mar 20, 2025
43feb5c
refactor: better name for set-release-from-file-sver arg
yougotwill Mar 20, 2025
203136f
refactor: remove async from handleFeatureFlagToggle function signature
yougotwill Mar 20, 2025
f4aa545
refactor: simplify key generation in FlagToggle component
yougotwill Mar 20, 2025
93b4620
refactor: update FeatureFlags component to use more specific type for…
yougotwill Mar 20, 2025
12ad8f9
feat: use typeugard to check we have a valid release channel when che…
yougotwill Mar 20, 2025
cede17e
fix: type guard release channel before making the set release ipc call
yougotwill Mar 20, 2025
74a58fe
feat: consolidate debug version check buttons into one component
yougotwill Mar 20, 2025
e2282d6
feat: update React type definitions to use dynamic release channel va…
yougotwill Mar 20, 2025
fa8f262
fix: type guard release channel in set-release-from-file-server IPC h…
yougotwill Mar 20, 2025
2af0a31
feat: separate macos build targets
yougotwill Jan 24, 2025
df9d8c2
feat: added updated prefix to all updater logging
yougotwill Jan 24, 2025
3a3f7ce
feat: add build_macos job for testing
yougotwill Jan 24, 2025
9dcdcac
fix: try to upload separate build artefacts for different architectures
yougotwill Jan 24, 2025
e7292fe
feat: use separate matrix strategies for each architecture
yougotwill Jan 24, 2025
4360edd
fix: only use one runner but a matrix strategy for each architecture
yougotwill Jan 24, 2025
cfba107
fix: use separate jobs for building arm64 and x64
yougotwill Feb 10, 2025
b1cc557
chore: bump release 1.14.6-alpha
yougotwill Jan 24, 2025
354d225
fix: remove path grepping from upload production artefacts
yougotwill Feb 10, 2025
b675803
fix: rename jobs to match human names for cpus
yougotwill Feb 10, 2025
f978daa
feat: building a release now targets both architectures
yougotwill Feb 19, 2025
48ecf07
feat: combine mac jobs into one
yougotwill Feb 19, 2025
ddb5ab8
fix: remove bad quote on move all files step
yougotwill Feb 19, 2025
c050f1b
fix: using mv still catches the production folder
yougotwill Feb 19, 2025
5dbb03f
fix: cp latest and builder-debug files since we need them twice
yougotwill Feb 19, 2025
10f208c
fix: bash does not support ls -f
yougotwill Feb 19, 2025
f75e539
fix: cleanup
yougotwill Feb 19, 2025
4bde8f6
fix: regression in updater logging after rebase
yougotwill Feb 19, 2025
91c25c3
feat: use default mac os build target
yougotwill Feb 19, 2025
9d8741e
fix: revert from default build target
yougotwill Feb 19, 2025
59051f3
fix: separate mac gh jobs again so intel builds work
yougotwill Feb 19, 2025
6bac8fe
feat: temp change the version and and repo for testing
yougotwill Feb 19, 2025
576b0ea
feat: revert version and org
yougotwill Feb 19, 2025
634989b
fix: update electron-builder version and simplify target configuration
yougotwill Feb 19, 2025
ee1d3af
feat: combine latest-mac.yml files from both architectures for autoup…
yougotwill Feb 20, 2025
af4fad1
fix: dedup yarn.lock
yougotwill Feb 20, 2025
538a87a
fix: clean up yarn.lock based on latest unstable
yougotwill Mar 4, 2025
91ae12a
fix: revert afterAllArtifactBuild
yougotwill Mar 5, 2025
1617e40
feat: setup release metadata correctly for mac builds
yougotwill Mar 5, 2025
a6e478a
fix: restore deb target
yougotwill Mar 5, 2025
48a5b1c
fix: update electron-builder version
yougotwill Mar 6, 2025
25985ec
fix: util worker tyoes for encryption and description
yougotwill Mar 6, 2025
156700f
feat: revert multiarch_build in build binaries actions since we have …
yougotwill Mar 11, 2025
6099f83
fix: revert regressopm target format in package.json for deb builds
yougotwill Mar 20, 2025
cfdeb63
fix: update types for encryption functions to use ArrayBuffer to matc…
yougotwill Mar 20, 2025
a9ba6a9
fix: update script sourcing syntax in build-binaries.yml for consistency
yougotwill Mar 20, 2025
48f87cf
fix: update comments in build-binaries.yml for clarity on publish con…
yougotwill Mar 20, 2025
04c42f7
feat: refactor macOS build process into a reusable action for better …
yougotwill Mar 20, 2025
a58ce23
fix: correct build script paths
yougotwill Mar 21, 2025
d0b9f06
fix: use correct path for upload_prod_artefacts
yougotwill Mar 21, 2025
eef08cb
feat: rename build steps to make release builds for clarity
yougotwill Mar 21, 2025
eb71aa8
fix: pass architecture as argument to setup script for macOS release …
yougotwill Mar 21, 2025
15c7032
fix: make mac build release steps naming consistent with linux matrix…
yougotwill Mar 21, 2025
84faa83
Merge branch 'feat/no-ref/alpha_releases' into feat/ses-2661/macos_arm64
yougotwill Mar 24, 2025
9091280
fix: reversions in yarn.lock and messages.json after merge
yougotwill Mar 24, 2025
1751810
Merge branch 'feat/no-ref/alpha_releases' into feat/ses-2661/macos_arm64
yougotwill Mar 24, 2025
88b5bb2
fix: executable permissions on mac build scripts
yougotwill Mar 24, 2025
7f3ff7b
fix: remove runner arch in make release build action
yougotwill Mar 24, 2025
c817db4
fix: in release arch script we trust the user argument and not host info
yougotwill Mar 24, 2025
2cb6eed
fix: add macOS signing inputs to build workflows instead of using env…
yougotwill Mar 24, 2025
dfbb750
fix: reexport environment inside of make release build action for ele…
yougotwill Mar 24, 2025
07e53ab
fix: each step need to have the env variables set
yougotwill Mar 24, 2025
7799dab
fix: add secrets to build binary steps and then pass from env to comp…
yougotwill Mar 24, 2025
3e56646
fix: revert extra env passing to make release build action
yougotwill Mar 24, 2025
d60dd20
fix: source mac certificate setup script in release build action
yougotwill Mar 24, 2025
2951ebd
fix: update architecture handling in mac release script for intel
yougotwill Mar 25, 2025
c7a6ff3
fix: dont source setup mac release combine script since it doesnt exp…
yougotwill Mar 25, 2025
81a783e
fix: optimize sparse checkout for package.json and remove redundant u…
yougotwill Mar 27, 2025
5af5f28
fix: update make release build action backup the release metadata wit…
yougotwill Mar 27, 2025
7f0549e
fix: update sparse checkout to include mac release combine script
yougotwill Mar 27, 2025
b0ead6a
Merge branch 'feat/no-ref/alpha_releases' into feat/ses-2661/macos_arm64
yougotwill Mar 28, 2025
038244e
Merge branch 'feat/no-ref/alpha_releases' into feat/ses-2661/macos_arm64
yougotwill Mar 30, 2025
9153fd4
feat: include Git SHA in release metadata filenames for better tracea…
yougotwill Mar 30, 2025
8136be4
fix: use pattern in combine metadata step and not name
yougotwill Mar 30, 2025
ab24bb6
feat: add release notes for alpha and stable versions with conditiona…
yougotwill Mar 31, 2025
05c93e2
fix: update mac icon to hopefully fix finder glitching
yougotwill Mar 31, 2025
ae85a19
Merge branch 'dev' into feat/ses-2661/macos_arm64
yougotwill Mar 31, 2025
ed8ced5
fix: add missing quotes in bodyFile
yougotwill Mar 31, 2025
24f2672
fix: remove omitBodyDuringUpdate option when we want to update the re…
yougotwill Mar 31, 2025
412ef97
fix: standardize header casing for "Verify Signatures" in release notes
yougotwill Mar 31, 2025
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
122 changes: 96 additions & 26 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Unit Test
run: yarn test

- name: Build but do not publish ${{ matrix.pkg_to_build }}
- name: Make release build but do not publish ${{ matrix.pkg_to_build }}
# always run this, except on "push" to "master" or alpha releases
if: ${{ env.SHOULD_PUBLISH == 'false' && env.SHOULD_PUBLISH_ALPHA == 'false' }}
run: |
Expand All @@ -72,7 +72,7 @@ jobs:
with:
upload_prefix: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.pkg_to_build }}

- name: Build & publish ${{ matrix.pkg_to_build }}
- name: Make release build & publish ${{ matrix.pkg_to_build }}
# only run this on "push" to "master" or alpha releases
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
run: |
Expand All @@ -85,16 +85,16 @@ jobs:
if: ${{ (env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true') && matrix.pkg_to_build == 'AppImage' }}
shell: bash
run: |
mv dist/latest-linux.yml dist/latest-linux-${{ matrix.pkg_to_build }}.yml
mv dist/latest-linux.yml dist/latest-linux-${{ matrix.pkg_to_build }}-${{ github.sha }}.yml

- name: Upload release metadata
# only run this on "push" to "master" or alpha releases
# Check the details of why we need this above (and why only for AppImage)
if: ${{ (env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true') && matrix.pkg_to_build == 'AppImage' }}
uses: actions/upload-artifact@v4
with:
name: latest-linux-${{ matrix.pkg_to_build }}.yml
path: dist/latest-linux-${{ matrix.pkg_to_build }}.yml
name: latest-linux-${{ matrix.pkg_to_build }}-${{ github.sha }}.yml
path: dist/latest-linux-${{ matrix.pkg_to_build }}-${{ github.sha }}.yml

post_build_linux:
needs: [build_linux]
Expand All @@ -110,6 +110,8 @@ jobs:
with:
sparse-checkout: |
package.json
build/release-notes.md
build/release-notes-alpha.md
sparse-checkout-cone-mode: false

- name: Get version tag from package.json
Expand All @@ -125,14 +127,14 @@ jobs:
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
uses: actions/download-artifact@v4
with:
name: latest-linux-AppImage.yml
name: latest-linux-AppImage-${{ github.sha }}.yml
path: dist

- name: Rename
# only run this on "push" to "master" or alpha releases
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
run: |
mv dist/latest-linux-AppImage.yml dist/latest-linux.yml
mv dist/latest-linux-AppImage-${{ github.sha }}.yml dist/latest-linux.yml

- name: Upload changes to draft release
# only run this on "push" to "master" or alpha releases
Expand All @@ -142,6 +144,7 @@ jobs:
tag: v${{ steps.get_version.outputs.VERSION_TAG }}
draft: true
name: 'Draft'
bodyFile: ${{ env.SHOULD_PUBLISH_ALPHA == 'true' && 'build/release-notes-alpha.md' || 'build/release-notes.md' }}
artifacts: 'dist/latest-linux.yml'
allowUpdates: true
omitNameDuringUpdate: true
Expand All @@ -167,7 +170,7 @@ jobs:
- name: Unit Test
run: yarn test

- name: Build but do not publish
- name: Make release build but do not publish
# always run this, except on "push" to "master" or alpha releases
if: ${{ env.SHOULD_PUBLISH == 'false' && env.SHOULD_PUBLISH_ALPHA == 'false' }}
run: yarn build-release
Expand All @@ -179,14 +182,44 @@ jobs:
with:
upload_prefix: ${{ runner.os }}-${{ runner.arch }}

- name: Build & publish
- name: Make release build & publish
# only run this on "push" to "master" or alpha releases
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
run: yarn build-release-publish # No other args needed for windows publish

# We want a mac arm64 build, and according to this https://github.com/actions/runner-images#available-images macos-14 is always arm64
# macos-14 is disabled for now as we hit our free tier limit for macos builds
build_macos_x64:
# We want both arm64 and intel mac builds, and according to this https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources macos-14 and above is always arm64 and macos-13 is the last intel runner
# NOTE x64 builds made on an arm64 host will not bundle the native modules correctly https://github.com/electron-userland/electron-builder/issues/8646
build_mac_arm64:
runs-on: macos-14
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE }}
MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID }}
SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD }}
SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }}
steps:
- run: git config --global core.autocrlf false

- name: Checkout git repo
uses: actions/checkout@v4

- name: Setup & Build
uses: ./actions/setup_and_build
with:
cache_suffix: mac-arm64

# we want to test on all platforms since some are testing the rendered menus (and are dependent on the platform)
- name: Unit Test
run: yarn test

- name: Make release build arm64
uses: ./actions/make_release_build
with:
architecture: arm64
should_publish: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}

build_mac_x64:
runs-on: macos-13
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -204,29 +237,66 @@ jobs:
- name: Setup & Build
uses: ./actions/setup_and_build
with:
cache_suffix: 'macos_x64'
cache_suffix: mac-x64

# we want to test on all platforms since some are testing the rendered menus (and are dependent on the platform)
- name: Unit Test
run: yarn test

- name: Build but do not publish
# always run this, except on "push" to "master" or alpha releases
if: ${{ env.SHOULD_PUBLISH == 'false' && env.SHOULD_PUBLISH_ALPHA == 'false' }}
- name: Make release build x64
uses: ./actions/make_release_build
with:
architecture: x64
should_publish: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}

post_build_mac:
needs: [build_mac_arm64, build_mac_x64]
runs-on: ubuntu-22.04
steps:
- name: Checkout git repo
# only run this on "push" to "master" or alpha releases
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
uses: actions/checkout@v4
# We only need the package.json file in this run (to extract the version being built)
with:
sparse-checkout: |
package.json
build/setup-mac-release-combine.sh

- name: Get version tag from package.json
id: get_version
# only run this on "push" to "master" or alpha releases
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
run: |
source ./build/setup-mac-certificate.sh
yarn build-release --config.mac.bundleVersion=${{ github.ref }}
version=$(node -p "require('./package.json').version")
echo "VERSION_TAG=$version" >> "$GITHUB_OUTPUT"

- name: Upload artefacts
# always run this, except on "push" to "master" or alpha releases
if: ${{ env.SHOULD_PUBLISH == 'false' && env.SHOULD_PUBLISH_ALPHA == 'false' }}
uses: ./actions/upload_prod_artefacts
- name: Download release metadata
# only run this on "push" to "master" or alpha releases
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
uses: actions/download-artifact@v4
with:
upload_prefix: ${{ runner.os }}-${{ runner.arch }}
pattern: latest-mac-*-${{ github.sha }}.yml
path: dist
merge-multiple: true

- name: Build & publish
- name: Combine release metadata
# only run this on "push" to "master" or alpha releases
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
run: |
source ./build/setup-mac-certificate.sh
yarn build-release-publish --config.mac.bundleVersion=${{ github.ref }}
./build/setup-mac-release-combine.sh ${{ github.sha }}

- name: Upload changes to draft release
# only run this on "push" to "master" or alpha releases
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
uses: ncipollo/release-action@v1
with:
tag: v${{ steps.get_version.outputs.VERSION_TAG }}
draft: true
name: "Draft"
artifacts: "dist/latest-mac.yml"
allowUpdates: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
replacesArtifacts: true
updateOnlyUnreleased: true
53 changes: 53 additions & 0 deletions actions/make_release_build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 'Make release build'
description: '[macOS only] Build a release for a specific cpu architecture and update the release metadata if needed.'
inputs:
# See 'arch' in https://www.electron.build/cli.html#targetconfiguration
architecture:
description: 'cpu architecture'
required: true
should_publish:
description: 'should publish'
required: true

runs:
using: 'composite'
steps:
- name: Build but do not publish
# always run this, except on "push" to "master" or alpha releases
if: ${{ inputs.should_publish == 'false' }}
shell: bash
run: |
source ./build/setup-mac-certificate.sh
yarn build-release --config.mac.bundleVersion=${{ github.ref }}

- name: Upload artefacts
# always run this, except on "push" to "master" or alpha releases
if: ${{ inputs.should_publish == 'false' }}
uses: ./actions/upload_prod_artefacts
with:
upload_prefix: mac-${{ inputs.architecture }}

- name: Build & publish
# only run this on "push" to "master" or alpha releases
if: ${{ inputs.should_publish == 'true' }}
shell: bash
run: |
source ./build/setup-mac-certificate.sh
yarn build-release-publish --config.mac.bundleVersion=${{ github.ref }}

# Note: We need to backup the latest.yml file because other jobs can overwrite it when they are complete e.g. macOS arm64 and x64
- name: Backup release metadata
# only run this on "push" to "master" or alpha releases
if: ${{ inputs.should_publish == 'true' }}
shell: bash
run: |
echo "Backup release metadata for ${{ inputs.architecture }}"
mv dist/latest-mac.yml dist/latest-mac-${{ inputs.architecture }}-${{ github.sha }}.yml

- name: Upload release metadata
# only run this on "push" to "master" or alpha releases
if: ${{ inputs.should_publish == 'true' }}
uses: actions/upload-artifact@v4
with:
name: latest-mac-${{ inputs.architecture }}-${{ github.sha }}.yml
path: dist/latest-mac-${{ inputs.architecture }}-${{ github.sha }}.yml
Binary file modified build/icon-mac.icns
100755 → 100644
Binary file not shown.
34 changes: 34 additions & 0 deletions build/release-notes-alpha.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
> [!WARNING]
>
> # ⚠️ This is an alpha release ⚠️
>
> It is experimental and for development purposes only.
> Do not use in production environments.

# Session

Session uses the Session encryption protocol and the Oxen blockchain’s decentralised Service Node network to provide anonymous, end-to-end encrypted messaging without relying on central servers.

# Release Overview

- TODO

## Other Changes

- TODO

# Bug Fixes

- TODO

# Supported Platforms

<!-- NOTE Make sure to verify the supported platforms have not changed before making a release -->

Session requires Windows 10 or later, macOS Ventura (13) or later, or a Linux distribution with glibc 2.35 or later like Debian 12 or Ubuntu 22.04.

# Verify Signatures

Follow the instructions [here](https://github.com/session-foundation/session-desktop/tree/master#verifying-signatures) using the signature below.

<!-- NOTE The signature is added below using the signing script. Do not write below here. -->
27 changes: 27 additions & 0 deletions build/release-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Session

Session uses the Session encryption protocol and the Oxen blockchain’s decentralised Service Node network to provide anonymous, end-to-end encrypted messaging without relying on central servers.

# Release Overview

- TODO

## Other Changes

- TODO

# Bug Fixes

- TODO

# Supported Platforms

<!-- NOTE Make sure to verify the supported platforms have not changed before making a release -->

Session requires Windows 10 or later, macOS Ventura (13) or later, or a Linux distribution with glibc 2.35 or later like Debian 12 or Ubuntu 22.04.

# Verify Signatures

Follow the instructions [here](https://github.com/session-foundation/session-desktop/tree/master#verifying-signatures) using the signature below.

<!-- NOTE The signature is added below using the signing script. Do not write below here. -->
28 changes: 28 additions & 0 deletions build/setup-mac-release-combine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

set -e

IDENTIFIER=$1
RELEASE_DIR="./dist"
ARM64_FILE="$RELEASE_DIR/latest-mac-arm64-$IDENTIFIER.yml"
X64_FILE="$RELEASE_DIR/latest-mac-x64-$IDENTIFIER.yml"
OUTPUT_FILE="$RELEASE_DIR/latest-mac.yml"

echo "Combined release metadata from both architectures"

echo "version: $(grep 'version:' $ARM64_FILE | awk '{print $2}')" > $OUTPUT_FILE
echo "files:" >> $OUTPUT_FILE
grep 'url:' $ARM64_FILE | while read -r line; do
echo " $line" >> $OUTPUT_FILE
grep -A 2 " $line" $ARM64_FILE | tail -n 2 >> $OUTPUT_FILE
done
grep 'url:' $X64_FILE | while read -r line; do
echo " $line" >> $OUTPUT_FILE
grep -A 2 " $line" $X64_FILE | tail -n 2 >> $OUTPUT_FILE
done

echo "path: $(grep 'path:' $ARM64_FILE | awk '{print $2}')" >> $OUTPUT_FILE
echo "sha512: $(grep 'sha512:' $ARM64_FILE | tail -n 1 | awk '{print $2}')" >> $OUTPUT_FILE
echo "releaseDate: $(grep 'releaseDate:' $ARM64_FILE | awk '{print $2}')" >> $OUTPUT_FILE

echo "Created latest-mac.yml"
Loading