Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions tools/ci_build/github/linux/copy_strip_binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
set -e -o -x

while getopts r:a:l:c:s:t: parameter_Option
do case "${parameter_Option}"

Check warning on line 5 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Invalid flags are not handled. Add a *) case. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:5:4: warning: Invalid flags are not handled. Add a *) case. (ShellCheck.SC2220)
in
r) BINARY_DIR=${OPTARG};;
a) ARTIFACT_NAME=${OPTARG};;
l) LIB_NAME=${OPTARG};;
c) BUILD_CONFIG=${OPTARG};;

Check warning on line 10 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 BUILD_CONFIG appears unused. Verify use (or export if used externally). Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:10:4: warning: BUILD_CONFIG appears unused. Verify use (or export if used externally). (ShellCheck.SC2034)
s) SOURCE_DIR=${OPTARG};;
t) COMMIT_ID=${OPTARG};;
esac
Expand All @@ -17,24 +17,19 @@

uname -a
cd "$BINARY_DIR"
mv installed/usr/local $ARTIFACT_NAME

Check warning on line 20 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:20:24: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
mv $ARTIFACT_NAME/include/onnxruntime/* $ARTIFACT_NAME/include
rmdir $ARTIFACT_NAME/include/onnxruntime
# Do not ship onnx_test_runner
rm -rf $ARTIFACT_NAME/bin

Check warning on line 22 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:22:8: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 22 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Use "${var:?}" to ensure this never expands to /bin . Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:22:8: warning: Use "${var:?}" to ensure this never expands to /bin . (ShellCheck.SC2115)
echo "Copy debug symbols in a separate file and strip the original binary."
if [[ $LIB_NAME == *.dylib ]]
then
dsymutil $BINARY_DIR/$ARTIFACT_NAME/lib/$LIB_NAME -o $BINARY_DIR/$ARTIFACT_NAME/lib/$LIB_NAME.dSYM

Check warning on line 26 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:26:70: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 26 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:26:58: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 26 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:26:45: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 26 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:26:26: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 26 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:26:14: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
strip -S $BINARY_DIR/$ARTIFACT_NAME/lib/$LIB_NAME
# copy the CoreML EP header for macOS build (libs with .dylib ext)
cp $SOURCE_DIR/include/onnxruntime/core/providers/coreml/coreml_provider_factory.h $BINARY_DIR/$ARTIFACT_NAME/include
else
# Linux
mv $ARTIFACT_NAME/lib64 $ARTIFACT_NAME/lib
fi

# copy the README, licence and TPN

Check warning on line 32 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[misspell] reported by reviewdog 🐶 "licence" is a misspelling of "license" Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:32:19: "licence" is a misspelling of "license"
cp $SOURCE_DIR/README.md $BINARY_DIR/$ARTIFACT_NAME/README.md
cp $SOURCE_DIR/docs/Privacy.md $BINARY_DIR/$ARTIFACT_NAME/Privacy.md
cp $SOURCE_DIR/LICENSE $BINARY_DIR/$ARTIFACT_NAME/LICENSE
Expand Down
Loading