diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2023-02-27 17:22:50 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2023-02-28 19:50:36 +0100 |
| commit | d0bd359e1e8b677c843e1ae058eef1322d744494 (patch) | |
| tree | 6ee394f982be1e1845d11bfff726cd38e8e6452d | |
| parent | e5b635ac16a844f80102183e97c8635a475c9922 (diff) | |
| download | mullvadvpn-d0bd359e1e8b677c843e1ae058eef1322d744494.tar.xz mullvadvpn-d0bd359e1e8b677c843e1ae058eef1322d744494.zip | |
Add quotes around variables
| -rwxr-xr-x | ci/buildserver-build-android.sh | 12 | ||||
| -rwxr-xr-x | ci/buildserver-build.sh | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/ci/buildserver-build-android.sh b/ci/buildserver-build-android.sh index 533e37f6d1..40483d87ac 100755 --- a/ci/buildserver-build-android.sh +++ b/ci/buildserver-build-android.sh @@ -29,7 +29,7 @@ build_ref() { ref=$1 tag=${2:-""} - current_hash="$(git rev-parse $ref^{commit})" + current_hash="$(git rev-parse "$ref^{commit}")" if [ -f "$LAST_BUILT_DIR/$current_hash" ]; then # This commit has already been built return 0 @@ -38,13 +38,13 @@ build_ref() { echo "" echo "[#] $ref: $current_hash, building new packages." - if [[ $ref == "refs/tags/"* ]] && ! git verify-tag $ref; then + if [[ $ref == "refs/tags/"* ]] && ! git verify-tag "$ref"; then echo "!!!" echo "[#] $ref is a tag, but it failed GPG verification!" echo "!!!" sleep 60 return 0 - elif [[ $ref == "refs/remotes/"* ]] && ! git verify-commit $current_hash; then + elif [[ $ref == "refs/remotes/"* ]] && ! git verify-commit "$current_hash"; then echo "!!!" echo "[#] $ref is a branch, but it failed GPG verification!" echo "!!!" @@ -55,7 +55,7 @@ build_ref() { # Clean our working dir and check out the code we want to build rm -r dist/ 2&>/dev/null || true git reset --hard - git checkout $ref + git checkout "$ref" git submodule update git clean -df @@ -71,8 +71,8 @@ build_ref() { # Pipes all matching names and their new name to mv pushd dist for original_file in MullvadVPN-*-dev-*{.apk,.aab}; do - new_file=$(echo $original_file | sed -nE "s/^(MullvadVPN-.*-dev-.*)(\.apk|\.aab)$/\1$version_suffix\2/p") - mv $original_file $new_file + new_file=$(echo "$original_file" | sed -nE "s/^(MullvadVPN-.*-dev-.*)(\.apk|\.aab)$/\1$version_suffix\2/p") + mv "$original_file" "$new_file" done popd fi diff --git a/ci/buildserver-build.sh b/ci/buildserver-build.sh index 7cecfb5e9c..e39ca98671 100755 --- a/ci/buildserver-build.sh +++ b/ci/buildserver-build.sh @@ -67,7 +67,7 @@ build_ref() { ref=$1 tag=${2:-""} - current_hash="$(git rev-parse $ref^{commit})" + current_hash="$(git rev-parse "$ref^{commit}")" if [ -f "$LAST_BUILT_DIR/$current_hash" ]; then # This commit has already been built return 0 @@ -76,13 +76,13 @@ build_ref() { echo "" echo "[#] $ref: $current_hash, building new packages." - if [[ $ref == "refs/tags/"* ]] && ! git verify-tag $ref; then + if [[ $ref == "refs/tags/"* ]] && ! git verify-tag "$ref"; then echo "!!!" echo "[#] $ref is a tag, but it failed GPG verification!" echo "!!!" sleep 60 return 0 - elif [[ $ref == "refs/remotes/"* ]] && ! git verify-commit $current_hash; then + elif [[ $ref == "refs/remotes/"* ]] && ! git verify-commit "$current_hash"; then echo "!!!" echo "[#] $ref is a branch, but it failed GPG verification!" echo "!!!" @@ -93,7 +93,7 @@ build_ref() { # Clean our working dir and check out the code we want to build rm -r dist/ 2&>/dev/null || true git reset --hard - git checkout $ref + git checkout "$ref" git submodule update git clean -df |
