diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2021-11-30 15:03:10 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2021-11-30 15:03:10 +0100 |
| commit | 7ae92aaad1acf92573cb3b16de37b31ac70e06f0 (patch) | |
| tree | 20b00872ebbfa936ae01dee9358b3b5f64423ca0 | |
| parent | bf3d51ddb4e003ba0137695ddd9b491de3c61362 (diff) | |
| parent | 6ffc632f41a60fe3160ae180514f369bf5ee9a1d (diff) | |
| download | mullvadvpn-7ae92aaad1acf92573cb3b16de37b31ac70e06f0.tar.xz mullvadvpn-7ae92aaad1acf92573cb3b16de37b31ac70e06f0.zip | |
Merge branch 'more-idiomatic-bash2'
| -rw-r--r-- | README.md | 4 | ||||
| -rwxr-xr-x | build-windows-modules.sh (renamed from build_windows_modules.sh) | 0 | ||||
| -rwxr-xr-x | build.sh | 2 | ||||
| -rwxr-xr-x | ci/check-rust.sh | 2 | ||||
| -rwxr-xr-x | ci/ci-rust-script.sh | 51 | ||||
| -rwxr-xr-x | prepare-release.sh | 3 |
6 files changed, 5 insertions, 57 deletions
@@ -382,7 +382,7 @@ echo "org.gradle.jvmargs=-Xmx4608M" >> ~/.gradle/gradle.properties 1. On Windows, make sure to start bash first (e.g., Git BASH). Then build the C++ libraries: ```bash - ./build_windows_modules.sh --dev-build + ./build-windows-modules.sh --dev-build ``` 1. Build the system daemon plus the other Rust tools and programs: @@ -634,7 +634,7 @@ If you're using GNOME, try installing one of these GNOME Shell extensions: ### Building, testing and misc -- **build_windows_modules.sh** - Compiles the C++ libraries needed on Windows +- **build-windows-modules.sh** - Compiles the C++ libraries needed on Windows - **build.sh** - Sanity checks the working directory state and then builds release artifacts for the app diff --git a/build_windows_modules.sh b/build-windows-modules.sh index 0b18f5d6cf..0b18f5d6cf 100755 --- a/build_windows_modules.sh +++ b/build-windows-modules.sh @@ -184,7 +184,7 @@ function build() { ################################################################################ if [[ "$(uname -s)" == "MINGW"* ]]; then - CPP_BUILD_MODES="Release" ./build_windows_modules.sh "$@" + CPP_BUILD_MODES="Release" ./build-windows-modules.sh "$@" fi ################################################################################ diff --git a/ci/check-rust.sh b/ci/check-rust.sh index 4862bc84dd..3d2bf34f67 100755 --- a/ci/check-rust.sh +++ b/ci/check-rust.sh @@ -10,7 +10,7 @@ export RUSTFLAGS="--deny warnings" # Build Windows modules case "$(uname -s)" in MINGW*|MSYS_NT*) - time ./build_windows_modules.sh --dev-build + time ./build-windows-modules.sh --dev-build ;; esac diff --git a/ci/ci-rust-script.sh b/ci/ci-rust-script.sh deleted file mode 100755 index 2d53fc3d65..0000000000 --- a/ci/ci-rust-script.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash - -set -eux - -RUST_TOOLCHAIN_CHANNEL=$1 -export RUSTFLAGS="--deny warnings" - -source env.sh - -case "$(uname -s)" in - Linux*|Darwin*) - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \ - -y --default-toolchain none --profile minimal - ;; - MINGW*|MSYS_NT*) - curl -sSf -o rustup-init.exe https://win.rustup.rs/ - ./rustup-init.exe -y --default-toolchain none --profile minimal --default-host x86_64-pc-windows-msvc - # See https://github.com/rust-lang/rustup.rs/issues/2082 - RUST_TOOLCHAIN_CHANNEL="$RUST_TOOLCHAIN_CHANNEL-x86_64-pc-windows-msvc" - ;; -esac -export PATH="$HOME/.cargo/bin/:$PATH" - -# Install the toolchain together with rustfmt. Here -c backtracks to last version where -# the component was available. -time rustup toolchain install $RUST_TOOLCHAIN_CHANNEL --no-self-update -c rustfmt - -case "$(uname -s)" in - MINGW*|MSYS_NT*) - export PATH="/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/Current/Bin/amd64/:$PATH" - time ./build_windows_modules.sh --dev-build - ;; -esac - -# Build wireguard-go -# On Windows, it relies on having msbuild.exe in your path. -./wireguard/build-wireguard-go.sh - -time cargo build --locked --verbose -time cargo test --locked --verbose - -if [[ "${RUST_TOOLCHAIN_CHANNEL}" == "nightly" && "$(uname -s)" == "Linux" ]]; then - rustfmt --version; - cargo fmt -- --check --unstable-features; -fi - -if ! git diff-index --quiet HEAD; then - echo "!!! Working directory is dirty !!!"; - git diff-index HEAD - exit 1; -fi diff --git a/prepare-release.sh b/prepare-release.sh index 9286d128a7..c6a05a0407 100755 --- a/prepare-release.sh +++ b/prepare-release.sh @@ -5,7 +5,6 @@ set -eu -PRODUCT_VERSION="" ANDROID="false" DESKTOP="false" VERSION_METADATA_ARGS="" @@ -30,7 +29,7 @@ for argument in "$@"; do esac done -if [ -z "$PRODUCT_VERSION" ]; then +if [[ -z ${PRODUCT_VERSION+x} ]]; then echo "Please give the release version as an argument to this script." echo "For example: '2018.1-beta3' for a beta release, or '2018.6' for a stable one." exit 1 |
