Update all non-major dependencies
[ProtonMail-WebClient.git] / applications / pass-desktop / tools / prepare-upload.sh
blobf1cf9714602aa8f516b313c79b192a035ac53166
1 #!/usr/bin/env sh
2 set -euo
4 echoerr() { echo "$@" 1>&2; }
6 CWD=$(pwd)
7 BUILD_DIR="applications/pass-desktop/out/make"
8 PLATFORM="$1"
10 # Deployment is EarlyAccess if its CI tag contains a dash, eg. proton-pass@1.0.0-rc1
11 TAG_VERSION="${CI_COMMIT_TAG:-}"
12 TAG_VERSION="${TAG_VERSION##*@}"
13 if [ -n "${TAG_VERSION}" ] && [ "${TAG_VERSION#*-}" = "${TAG_VERSION}" ]; then
14 CHANNEL="Stable"
15 else
16 CHANNEL="EarlyAccess"
19 # Currently, we're only supporting the stable channel
20 if [ "$CHANNEL" != "Stable" ]; then
21 echoerr "Channels other than 'Stable' are currently unsupported (v=${TAG_VERSION},c=${CHANNEL})"
22 exit 1
25 # Copy artefacts
26 cd "$BUILD_DIR"
27 if [ "$CHANNEL" = "Stable" ] && [ "$PLATFORM" = "windows" ]; then
28 cp ./squirrel.windows/x64/*.exe "ProtonPass_Setup.exe"
29 elif [ "$CHANNEL" = "Stable" ] && [ "$PLATFORM" = "linux" ]; then
30 cp ./rpm/x64/*.rpm "ProtonPass.rpm"
31 cp ./deb/x64/*.deb "ProtonPass.deb"
32 elif [ "$CHANNEL" = "Stable" ] && [ "$PLATFORM" = "macos" ]; then
33 cp ./*.dmg "ProtonPass.dmg"
36 cd "$CWD"
37 if [ "$CHANNEL" = "Stable" ]; then
38 find "$BUILD_DIR" -type f ! -name RELEASES ! -name RELEASES.json > artifact.list
41 printf "PASS_RELEASE_CHANNEL=%s\nPASS_RELEASE_PLATFORM=%s" "$CHANNEL" "$PLATFORM" > deploy.env