Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix linter issues
Browse files Browse the repository at this point in the history
Augustyniak committed Oct 7, 2024
1 parent 7bb2de2 commit bea1bb7
Showing 6 changed files with 14 additions and 9 deletions.
8 changes: 4 additions & 4 deletions ci/checksum.sh
Original file line number Diff line number Diff line change
@@ -5,28 +5,28 @@ set -euo pipefail
function create_MD5_file() {
local -r file="$1"
echo "+ Generating MD5 checksum for $file"
echo "$(md5sum "$file" | awk '{print $1}')" > "$file.md5"
"$(md5sum "$file" | awk '{print $1}')" > "$file.md5"
cat "$file.md5"
}

function create_SHA1_file() {
local -r file="$1"
echo "+ Generating SHA-1 checksum for $file"
echo "$(sha1sum "$file" | awk '{print $1}')" > "$file.sha1"
"$(sha1sum "$file" | awk '{print $1}')" > "$file.sha1"
cat "$file.sha1"
}

function create_SHA256_file() {
local -r file="$1"
echo "+ Generating SHA256 checksum for $file"
echo "$(shasum -a 256 "$file" | awk '{print $1}')" > "$file.sha256"
"$(shasum -a 256 "$file" | awk '{print $1}')" > "$file.sha256"
cat "$file.sha256"
}

function create_SHA512_file() {
local -r file="$1"
echo "+ Generating SHA512 checksum for $file"
echo "$(shasum -a 512 "$file" | awk '{print $1}')" > "$file.sha512"
"$(shasum -a 512 "$file" | awk '{print $1}')" > "$file.sha512"
cat "$file.sha512"
}

2 changes: 1 addition & 1 deletion ci/gh_prepare_ios_artifacts.sh
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ function prepare_library_artifacts() {
echo "+++ Preparing $library.ios.zip"

pushd "$(mktemp -d)"
unzip -o "$sdk_repo"/$library.ios.zip -d tmp
unzip -o "$sdk_repo/$library.ios.zip" -d tmp
unzip -o "tmp/$library.xcframework.zip" -d tmp
rm -rf "tmp/$library.xcframework.zip"

2 changes: 1 addition & 1 deletion ci/mac_ci_setup.sh
Original file line number Diff line number Diff line change
@@ -19,4 +19,4 @@ rm -f /usr/local/bin/python3-config
rm -f /usr/local/bin/python3.11-config

HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install llvm
echo "/opt/homebrew/opt/llvm/bin" >> $GITHUB_PATH
echo "/opt/homebrew/opt/llvm/bin" >> "$GITHUB_PATH"
3 changes: 2 additions & 1 deletion tools/android_release.sh
Original file line number Diff line number Diff line change
@@ -5,7 +5,8 @@ set -euo pipefail
if [ $# -eq 0 ]
then
# Use commit SHA as version if version argument was not passed.
readonly version="$(git rev-parse --short HEAD)"
version="$(git rev-parse --short HEAD)"
readonly version
else
readonly version="$1"
fi
2 changes: 2 additions & 0 deletions tools/live_match_comparison.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

./bazelw build //test/benchmark:live_benchmark --config benchmark
rm -rf target/criterion

6 changes: 4 additions & 2 deletions tools/rust_std_checksum.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

# shellcheck disable=SC2016

if [ -z "$1" ]; then
echo "Usage: $0 <rust version>"
exit 1
@@ -10,10 +12,10 @@ AWK_FORMAT='{print " \""$2"\": \""$1"\","}'
SED_REPLACE="s/$VERSION/\\\" + RUST_VERSION + \\\"/"

for arch in aarch64-apple-ios-sim aarch64-apple-ios x86_64-apple-ios aarch64-linux-android armv7-linux-androideabi i686-linux-android; do
curl -Ls https://github.com/bitdriftlabs/rust-std-mobile/releases/download/${VERSION}/rust-std-${VERSION}-${arch}.tar.gz.sha256 | awk "$AWK_FORMAT" | sed -e "$SED_REPLACE"
curl -Ls "https://github.com/bitdriftlabs/rust-std-mobile/releases/download/${VERSION}/rust-std-${VERSION}-${arch}.tar.gz.sha256" | awk "$AWK_FORMAT" | sed -e "$SED_REPLACE"
done

# Now fetch the shas from the official releases
for tool in rustc cargo llvm-tools rust-std clippy rustfmt; do
curl -Ls https://static.rust-lang.org/dist/${tool}-${VERSION}-aarch64-apple-darwin.tar.gz.sha256 | awk "$AWK_FORMAT" | sed -e "$SED_REPLACE"
curl -Ls "https://static.rust-lang.org/dist/${tool}-${VERSION}-aarch64-apple-darwin.tar.gz.sha256" | awk "$AWK_FORMAT" | sed -e "$SED_REPLACE"
done

0 comments on commit bea1bb7

Please sign in to comment.