Skip to content

Commit 03e9bfb

Browse files
committed
SC2155
1 parent fa26733 commit 03e9bfb

File tree

6 files changed

+32
-17
lines changed

6 files changed

+32
-17
lines changed

android/scripts/generate-pngs.sh

+8-5
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ function convert_image() {
4646

4747
local source_image="$1"
4848
local dpi_config="$2"
49-
49+
local destination_image
50+
5051
if (( $# >= 3 )); then
51-
local destination_image="$3"
52+
destination_image="$3"
5253
else
53-
local destination_image="$(basename "$source_image" .svg | sed -e 's/-/_/g')"
54+
destination_image="$(basename "$source_image" .svg | sed -e 's/-/_/g')"
5455
fi
5556

5657
if (( $# >= 4 )); then
@@ -59,8 +60,10 @@ function convert_image() {
5960
local destination_dir="drawable"
6061
fi
6162

62-
local dpi="$(echo "$dpi_config" | cut -f1 -d'-')"
63-
local size="$(echo "$dpi_config" | cut -f2 -d'-')"
63+
local dpi
64+
dpi="$(echo "$dpi_config" | cut -f1 -d'-')"
65+
local size
66+
size="$(echo "$dpi_config" | cut -f2 -d'-')"
6467

6568
local dpi_dir="../lib/resource/src/main/res/${destination_dir}-${dpi}"
6669

ci/ios/buildserver-build-ios.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ function run_build_loop() {
9292
run_git tag | xargs git tag -d > /dev/null
9393

9494
run_git fetch --prune --tags 2> /dev/null || continue
95-
local tags=( $(run_git tag | grep "$TAG_PATTERN_TO_BUILD") )
95+
local tags
96+
tags=( $(run_git tag | grep "$TAG_PATTERN_TO_BUILD") )
9697

9798
for tag in "${tags[@]}"; do
9899
build_ref "refs/tags/$tag"

ci/verify-locked-down-signatures.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
set -eu
33
shopt -s nullglob
44

5-
readonly SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
6+
readonly SCRIPT_DIR
67
readonly REPO_DIR="$SCRIPT_DIR/.."
78

89
# In the CI environment we would like to import trusted public keys from a file,

ios/build.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ install_mobile_provisioning() {
6565
fi
6666

6767
for mobile_provisioning_path in "$IOS_PROVISIONING_PROFILES_DIR"/*.mobileprovision; do
68-
local profile_uuid=$(get_mobile_provisioning_uuid "$mobile_provisioning_path")
68+
local profile_uuid
69+
profile_uuid=$(get_mobile_provisioning_uuid "$mobile_provisioning_path")
6970
local target_path="$SYSTEM_PROVISIONING_PROFILES_DIR/$profile_uuid.mobileprovision"
7071

7172
if [[ -f "$target_path" ]]; then

test/ci-runtests.sh

+8-4
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ function download_app_package {
122122
package_repo="${BUILD_RELEASE_REPOSITORY}"
123123
fi
124124

125-
local filename=$(get_app_filename "$version" "$os")
125+
local filename
126+
filename=$(get_app_filename "$version" "$os")
126127
local url="${package_repo}/$version/$filename"
127128

128129
mkdir -p "$PACKAGES_DIR"
@@ -170,7 +171,8 @@ function download_e2e_executable {
170171
package_repo="${BUILD_RELEASE_REPOSITORY}"
171172
fi
172173

173-
local filename=$(get_e2e_filename "$version" "$os")
174+
local filename
175+
filename=$(get_e2e_filename "$version" "$os")
174176
local url="${package_repo}/$version/additional-files/$filename"
175177

176178
mkdir -p "$PACKAGES_DIR"
@@ -185,8 +187,10 @@ function download_e2e_executable {
185187
function run_tests_for_os {
186188
local os=$1
187189

188-
local prev_filename=$(get_app_filename "$OLD_APP_VERSION" "$os")
189-
local cur_filename=$(get_app_filename "$NEW_APP_VERSION" "$os")
190+
local prev_filename
191+
prev_filename=$(get_app_filename "$OLD_APP_VERSION" "$os")
192+
local cur_filename
193+
cur_filename=$(get_app_filename "$NEW_APP_VERSION" "$os")
190194

191195
rm -f "$SCRIPT_DIR/.ci-logs/${os}_report"
192196

wireguard/build-wireguard-go.sh

+10-5
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@ function is_docker_build {
2727
}
2828

2929
function unix_target_triple {
30-
local platform="$(uname -s)"
30+
local platform
31+
platform="$(uname -s)"
3132
if [[ ("${platform}" == "Linux") ]]; then
32-
local arch="$(uname -m)"
33+
local arch
34+
arch="$(uname -m)"
3335
echo "${arch}-unknown-linux-gnu"
3436
elif [[ ("${platform}" == "Darwin") ]]; then
35-
local arch="$(uname -m)"
37+
local arch
38+
arch="$(uname -m)"
3639
if [[ ("${arch}" == "arm64") ]]; then
3740
arch="aarch64"
3841
fi
@@ -68,7 +71,8 @@ function build_unix {
6871
export GOARCH=arm64
6972
fi
7073

71-
export CC="$(xcrun -sdk "$SDKROOT" --find clang) -arch $arch -isysroot $SDKROOT"
74+
CC="$(xcrun -sdk "$SDKROOT" --find clang) -arch $arch -isysroot $SDKROOT"
75+
export CC
7276
export CFLAGS="-isysroot $SDKROOT -arch $arch -I$SDKROOT/usr/include"
7377
export LD_LIBRARY_PATH="$SDKROOT/usr/lib"
7478
export CGO_CFLAGS="-isysroot $SDKROOT -arch $arch"
@@ -100,7 +104,8 @@ function build_wireguard_go {
100104
return
101105
fi
102106

103-
local platform="$(uname -s)";
107+
local platform
108+
platform="$(uname -s)";
104109
case "$platform" in
105110
Linux*|Darwin*) build_unix "${1:-$(unix_target_triple)}";;
106111
*)

0 commit comments

Comments
 (0)