Skip to content

Commit

Permalink
Change: caseで書きかえる
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenc-nanashi committed Apr 17, 2024
1 parent 2966c1f commit 2a9f8af
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -475,16 +475,17 @@ jobs:
target=$2
root=$(echo "$1" | grep -q android && echo jniLibs || echo dll)
dest="lib/src/main/resources/$root/$target"
mkdir -p "$dest"
cp -v "../../artifacts/voicevox_core_java_api-$artifact_name"/*.{dll,so,dylib} "$dest" || true
# こうするしかないはず。echoを使わない書き方があるかもしれないが、シンプルに面倒。
# shellcheck disable=SC2086
if [ "$(echo $dest/*)" = "$dest/*" ]; then
echo "No dll found in $artifact_name"
exit 1
else
echo "$artifact_name => $dest"
fi
mkdir -p "$artifact_name"
case "$target" in
windows-*) ext=dll ;;
osx-*) ext=dylib ;;
linux-*) ext=so ;;
android-*) ext=so ;;
*) echo "unknown target: $target"; exit 1 ;;
esac
cp -v "../../artifacts/voicevox_core_java_api-$artifact_name"/*."$ext" "$dest"
echo "$artifact_name => $dest"
}
function clean_dlls() {
rm -rf lib/src/main/resources/dll
Expand Down

0 comments on commit 2a9f8af

Please sign in to comment.