summaryrefslogtreecommitdiffhomepage
path: root/ci
diff options
context:
space:
mode:
authorLinus Färnstrand <faern@faern.net>2023-03-03 15:06:14 +0100
committerLinus Färnstrand <linus@mullvad.net>2023-03-03 15:48:35 +0100
commitc7262e4a32a9265c9dd05fe4e667221351655eaa (patch)
tree93e2fa976870b31d4fbe3d39d7406e125f716aeb /ci
parentac33d3df5f1c5e2ffaf3e4ae887750638a716acf (diff)
downloadmullvadvpn-c7262e4a32a9265c9dd05fe4e667221351655eaa.tar.xz
mullvadvpn-c7262e4a32a9265c9dd05fe4e667221351655eaa.zip
Change bash function format to match our style guide in buildserver-*
Diffstat (limited to 'ci')
-rwxr-xr-xci/buildserver-build-android.sh4
-rwxr-xr-xci/buildserver-build.sh12
2 files changed, 8 insertions, 8 deletions
diff --git a/ci/buildserver-build-android.sh b/ci/buildserver-build-android.sh
index 873da1a394..81098eb9e8 100755
--- a/ci/buildserver-build-android.sh
+++ b/ci/buildserver-build-android.sh
@@ -18,14 +18,14 @@ ANDROID_CREDENTIALS_DIR="$SCRIPT_DIR/credentials-android"
BRANCHES_TO_BUILD=("origin/main")
TAG_PATTERN_TO_BUILD="^android/"
-upload() {
+function upload {
for f in MullvadVPN-*.{apk,aab}; do
sha256sum "$f" > "$f.sha256"
mv "$f" "$f.sha256" "$UPLOAD_DIR/"
done
}
-build_ref() {
+function build_ref {
ref=$1
tag=${2:-""}
diff --git a/ci/buildserver-build.sh b/ci/buildserver-build.sh
index b8f1a699c2..aa85313cfe 100755
--- a/ci/buildserver-build.sh
+++ b/ci/buildserver-build.sh
@@ -32,7 +32,7 @@ case "$(uname -s)" in
esac
# Uploads whatever matches the first argument to the Linux build server
-upload_sftp() {
+function upload_sftp {
echo "Uploading Mullvad VPN installers to app-build-linux:upload/"
sftp app-build-linux <<EOF
cd upload
@@ -41,7 +41,7 @@ bye
EOF
}
-upload() {
+function upload {
version=$1
files=( * )
@@ -66,7 +66,7 @@ upload() {
# Run the arguments in an environment suitable for building the app. This
# means in a container on Linux, and straight up in the local shell elsewhere.
-run_in_build_env() {
+function run_in_build_env {
if [[ "$(uname -s)" == "Linux" ]]; then
./building/container-run.sh linux "$@"
else
@@ -78,7 +78,7 @@ run_in_build_env() {
# To cross compile pass in `target` as an environment variable
# to this function. Must also pass `artifact_dir` to show where to move the built artifacts.
# Pass all the build arguments as arguments to this function
-build() {
+function build {
local target=${target:-""}
local build_args=("${@}")
@@ -92,7 +92,7 @@ build() {
# Checks out the passed git reference passed to the working directory.
# Returns an error code if the commit/tag at `ref` is not properly signed.
-checkout_ref() {
+function checkout_ref {
ref=$1
if [[ $ref == "refs/tags/"* ]] && ! git verify-tag "$ref"; then
echo "!!!"
@@ -114,7 +114,7 @@ checkout_ref() {
git clean -df
}
-build_ref() {
+function build_ref {
ref=$1
tag=${2:-""}