2021-06-02 23:45:08 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Copyright 2017-2021 Signal Messenger, LLC
|
2020-10-30 20:34:04 +00:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2021-07-30 19:53:57 +00:00
|
|
|
# First run on a machine - uncomment the two 'first run' sections below, comment out the 'later runs' section.
|
2017-11-16 23:33:19 +00:00
|
|
|
#
|
2017-04-06 22:10:04 +00:00
|
|
|
# Release:
|
Beta versions support: SxS support, in-app env/instance display (#1606)
* Script for beta config; unique data dir, in-app env/type display
To release a beta build, increment the version and add -beta-N to the
end, then go through all the standard release activities.
The prepare-build npm script then updates key bits of the package.json
to ensure that the beta build can be installed alongside a production
build. This includes a new name ('Signal Beta') and a different location
for application data.
Note: Beta builds can be installed alongside production builds.
As part of this, a couple new bits of data are shown across the app:
- Environment (development or test, not shown if production)
- App Instance (disabled in production; used for multiple accounts)
These are shown in:
- The window title - both environment and app instance. You can tell
beta builds because the app name, preceding these data bits, is
different.
- The about window - both environment and app instance. You can tell
beta builds from the version number.
- The header added to the debug log - just environment. The version
number will tell us if it's a beta build, and app instance isn't
helpful.
* Turn on single-window mode in non-production modes
Because it's really frightening when you see 'unable to read from db'
errors in the console.
* aply.sh: More instructions for initial setup and testing
* Gruntfile: Get consistent with use of package.json datas
* Linux: manually update desktop keys, since macros not available
2017-10-30 20:57:13 +00:00
|
|
|
# NAME=signal-desktop(-beta) VERSION=X.X.X ./aptly.sh
|
|
|
|
|
2021-06-02 23:45:08 +00:00
|
|
|
set -e
|
|
|
|
set -u
|
|
|
|
set -o pipefail
|
|
|
|
|
2021-07-30 19:53:57 +00:00
|
|
|
echo
|
|
|
|
echo "aptly.sh: Releasing $NAME build version $VERSION"
|
2017-04-06 22:10:04 +00:00
|
|
|
|
|
|
|
REPO=signal-desktop
|
2019-03-22 21:26:07 +00:00
|
|
|
CURRENT=xenial
|
2021-06-02 23:45:08 +00:00
|
|
|
SNAPSHOT="signal-desktop_v$VERSION"
|
2017-04-06 22:10:04 +00:00
|
|
|
GPG_KEYID=57F6FB06
|
|
|
|
|
2021-07-30 19:53:57 +00:00
|
|
|
# FIRST RUN
|
|
|
|
# echo
|
|
|
|
# echo "aptly.sh: Setting up repo and mirror"
|
|
|
|
# aptly repo create signal-desktop
|
|
|
|
# aptly mirror create -ignore-signatures backfill-mirror https://updates.signal.org/desktop/apt xenial
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "aptly.sh: Fetching latest released files so we don't erase anything"
|
|
|
|
aptly mirror update -ignore-signatures backfill-mirror
|
|
|
|
aptly repo import backfill-mirror signal-desktop signal-desktop signal-desktop-beta
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "aptly.sh: Adding newly-built deb to repo"
|
2021-06-03 15:53:17 +00:00
|
|
|
aptly repo add "$REPO" release/"$NAME"_"$VERSION"_*.deb
|
2021-07-30 19:53:57 +00:00
|
|
|
|
|
|
|
echo
|
|
|
|
echo "aptly.sh: Creating a snapshot from the current state of the repo"
|
2021-06-02 23:45:08 +00:00
|
|
|
aptly snapshot create "$SNAPSHOT" from repo "$REPO"
|
Beta versions support: SxS support, in-app env/instance display (#1606)
* Script for beta config; unique data dir, in-app env/type display
To release a beta build, increment the version and add -beta-N to the
end, then go through all the standard release activities.
The prepare-build npm script then updates key bits of the package.json
to ensure that the beta build can be installed alongside a production
build. This includes a new name ('Signal Beta') and a different location
for application data.
Note: Beta builds can be installed alongside production builds.
As part of this, a couple new bits of data are shown across the app:
- Environment (development or test, not shown if production)
- App Instance (disabled in production; used for multiple accounts)
These are shown in:
- The window title - both environment and app instance. You can tell
beta builds because the app name, preceding these data bits, is
different.
- The about window - both environment and app instance. You can tell
beta builds from the version number.
- The header added to the debug log - just environment. The version
number will tell us if it's a beta build, and app instance isn't
helpful.
* Turn on single-window mode in non-production modes
Because it's really frightening when you see 'unable to read from db'
errors in the console.
* aply.sh: More instructions for initial setup and testing
* Gruntfile: Get consistent with use of package.json datas
* Linux: manually update desktop keys, since macros not available
2017-10-30 20:57:13 +00:00
|
|
|
|
2021-07-30 19:53:57 +00:00
|
|
|
# FIRST RUN - https://www.aptly.info/doc/aptly/publish/snapshot/
|
|
|
|
# echo
|
|
|
|
# echo "aptly.sh: Setting up local publish with current snapshot"
|
2021-06-04 00:42:24 +00:00
|
|
|
# aptly publish snapshot -gpg-key="$GPG_KEYID" -distribution="$CURRENT" "$SNAPSHOT"
|
Beta versions support: SxS support, in-app env/instance display (#1606)
* Script for beta config; unique data dir, in-app env/type display
To release a beta build, increment the version and add -beta-N to the
end, then go through all the standard release activities.
The prepare-build npm script then updates key bits of the package.json
to ensure that the beta build can be installed alongside a production
build. This includes a new name ('Signal Beta') and a different location
for application data.
Note: Beta builds can be installed alongside production builds.
As part of this, a couple new bits of data are shown across the app:
- Environment (development or test, not shown if production)
- App Instance (disabled in production; used for multiple accounts)
These are shown in:
- The window title - both environment and app instance. You can tell
beta builds because the app name, preceding these data bits, is
different.
- The about window - both environment and app instance. You can tell
beta builds from the version number.
- The header added to the debug log - just environment. The version
number will tell us if it's a beta build, and app instance isn't
helpful.
* Turn on single-window mode in non-production modes
Because it's really frightening when you see 'unable to read from db'
errors in the console.
* aply.sh: More instructions for initial setup and testing
* Gruntfile: Get consistent with use of package.json datas
* Linux: manually update desktop keys, since macros not available
2017-10-30 20:57:13 +00:00
|
|
|
|
2021-07-30 19:53:57 +00:00
|
|
|
# LATER RUNS - https://www.aptly.info/doc/aptly/publish/switch/
|
|
|
|
echo
|
|
|
|
echo "aptly.sh: Switching local publish to current snapshot"
|
2021-06-02 23:45:08 +00:00
|
|
|
aptly publish switch -gpg-key="$GPG_KEYID" "$CURRENT" "$SNAPSHOT"
|
2017-12-05 02:51:38 +00:00
|
|
|
|
2021-07-30 19:53:57 +00:00
|
|
|
echo
|
|
|
|
echo "aptly.sh: Syncing local publish to s3"
|
2021-08-05 17:23:08 +00:00
|
|
|
aws s3 sync ~/.aptly/public/pool/ s3://updates.signal.org/desktop/apt/pool/
|
|
|
|
aws s3 sync ~/.aptly/public/dists/ s3://updates.signal.org/desktop/apt/dists/
|
2021-07-30 19:53:57 +00:00
|
|
|
|
|
|
|
echo
|
|
|
|
echo "aptly.sh: Complete!"
|