File tree 2 files changed +18
-10
lines changed
2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
+ # This script is invoked by the GitHub workflow file below to launch the desktop end to end test framwork.
4
+ # <https://github.com/mullvad/mullvadvpn-app/blob/main/.github/workflows/desktop-e2e.yml>
5
+
3
6
# TODO: Break this down into multiple, smaller scripts and compose them in this file.
4
7
5
8
set -eu
28
31
# shellcheck source=test/scripts/utils/lib.sh
29
32
source " ../utils/lib.sh"
30
33
34
+ # The `CURRENT_VERSION` variable is set by the workflow file which invokes `mullvad-version`
35
+ # We need to add a suffix with tag information to get the current version string
36
+ TAG=$( git describe --exact-match HEAD 2> /dev/null || echo " " )
37
+ if [[ -n " $TAG " && ${CURRENT_VERSION} =~ -d ev- ]]; then
38
+ # Remove disallowed version characters from the tag
39
+ CURRENT_VERSION+=" +${TAG// [^0-9a-z_-]/ } "
40
+ fi
41
+ export CURRENT_VERSION
42
+
31
43
echo " **********************************"
32
44
echo " * Version to upgrade from: $LATEST_STABLE_RELEASE "
33
45
echo " * Version to test: $CURRENT_VERSION "
Original file line number Diff line number Diff line change @@ -26,14 +26,6 @@ LATEST_STABLE_RELEASE=$(jq -r '[.[] | select(.prerelease==false)] | .[0].tag_nam
26
26
commit=$( git rev-parse HEAD^\{ commit\} )
27
27
commit=${commit: 0: 6}
28
28
29
- TAG=$( git describe --exact-match HEAD 2> /dev/null || echo " " )
30
-
31
- if [[ -n " $TAG " && ${CURRENT_VERSION} =~ -d ev- ]]; then
32
- # Remove disallowed version characters from the tag
33
- CURRENT_VERSION+=" +${TAG// [^0-9a-z_-]/ } "
34
- fi
35
-
36
- export CURRENT_VERSION
37
29
export LATEST_STABLE_RELEASE
38
30
39
31
function print_available_releases {
@@ -250,15 +242,19 @@ function run_tests_for_os {
250
242
function build_current_version {
251
243
local app_dir
252
244
app_dir=" $REPO_ROOT "
245
+ local current_version
246
+ pushd " $app_dir "
247
+ current_version=$( cargo run --package mullvad-version)
248
+ popd
253
249
local app_filename
254
250
# TODO: TEST_OS must be set to local OS manually, should be set automatically
255
- app_filename=$( get_app_filename " $CURRENT_VERSION " " ${TEST_OS:? Error: TEST_OS not set} " )
251
+ app_filename=$( get_app_filename " $current_version " " ${TEST_OS:? Error: TEST_OS not set} " )
256
252
local package_dir
257
253
package_dir=$( get_package_dir)
258
254
local app_package=" $package_dir " /" $app_filename "
259
255
260
256
local gui_test_filename
261
- gui_test_filename=$( get_e2e_filename " $CURRENT_VERSION " " $TEST_OS " )
257
+ gui_test_filename=$( get_e2e_filename " $current_version " " $TEST_OS " )
262
258
local gui_test_bin=" $package_dir " /" $gui_test_filename "
263
259
264
260
if [ ! -f " $app_package " ]; then
You can’t perform that action at this time.
0 commit comments