summaryrefslogtreecommitdiffhomepage
path: root/desktop/scripts/release/3-verify-build
blob: d4e8dce80029cd1ca4098edf41f6a934ef175959 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash

# This script verifies the build produced by the buildserver. It helps the user verify the staging
# repository versions and triggers a e2e run with a small subset of the tests to verify the build.
# This should be be run after `2-push-release-tag` and after the build server has finished building.

set -eu

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"

REPO_ROOT=../../../
PRODUCT_VERSION_PATH=$REPO_ROOT/dist-assets/desktop-product-version.txt
PRODUCT_VERSION=$(cat $PRODUCT_VERSION_PATH)

$REPO_ROOT/scripts/utils/gh-ready-check
source $REPO_ROOT/scripts/utils/log

function verify_repository_versions {
  print_versions_args=( --staging )

  if [[ "$PRODUCT_VERSION" == *-beta* ]]; then
    print_versions_args+=( --beta )
  fi

  deb_version_output=$(./print-package-versions --deb "${print_versions_args[@]}")
  deb_version=$(echo "$deb_version_output" | grep mullvad-vpn | awk '{print $2}' | sed 's/~/-/')

  if [[ "$deb_version" != "$PRODUCT_VERSION" ]]; then
    log_error "Incorrect deb version in repository ($deb_version)"
    echo "$deb_version_output"
    exit 1
  fi

  rpm_version_output=$(./print-package-versions --rpm "${print_versions_args[@]}")
  rpm_version=$(echo "$rpm_version_output" | grep mullvad-vpn | awk '{print $2}' | sed 's/~/-/')

  if [[ "$rpm_version" != "$PRODUCT_VERSION-1" ]]; then
    log_error "Incorrect rpm version in repository ($rpm_version)"
    echo "$rpm_version_output"
    exit 1
  fi
}

verify_repository_versions
gh workflow run desktop-e2e.yml --ref "$PRODUCT_VERSION" \
    -f oses="fedora41 ubuntu2404 windows11 macos15" \
    -f tests="test_quantum_resistant_tunnel test_ui_tunnel_settings"