Skip to content

Commit 6f0265a

Browse files
committed
_g
1 parent f6c553b commit 6f0265a

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

.github/workflows/build.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,24 @@ jobs:
2727
id: find_artifact
2828
shell: bash
2929
run: |
30-
echo "Looking for debug and release .so files..."
30+
DEBUG_SO=target/debug/libsqlite3.so
31+
RELEASE_SO=target/release/libsqlite3.so
3132
32-
DEBUG_SO=$(find target/debug -type f -name "*.so" | head -n1)
33-
RELEASE_SO=$(find target/release -type f -name "*.so" | head -n1)
33+
if [[ ! -f "$DEBUG_SO" ]]; then
34+
echo "Debug shared library not found at $DEBUG_SO"
35+
exit 1
36+
fi
3437
35-
if [[ -z "$DEBUG_SO" || -z "$RELEASE_SO" ]]; then
36-
echo "Error: Could not find both debug and release .so files."
38+
if [[ ! -f "$RELEASE_SO" ]]; then
39+
echo "Release shared library not found at $RELEASE_SO"
3740
exit 1
3841
fi
3942
40-
DEBUG_NAME="$(basename "${DEBUG_SO%.*}")-debug.so"
41-
RELEASE_NAME="$(basename "${RELEASE_SO%.*}")-release.so"
43+
DEBUG_NAME=target/debug/libsqlite3-debug.so
44+
RELEASE_NAME=target/release/libsqlite3-release.so
4245
43-
cp "$DEBUG_SO" "$DEBUG_NAME"
44-
cp "$RELEASE_SO" "$RELEASE_NAME"
46+
mv "$DEBUG_SO" "$DEBUG_NAME"
47+
mv "$RELEASE_SO" "$RELEASE_NAME"
4548
4649
echo "DEBUG_ARTIFACT=$DEBUG_NAME" >> $GITHUB_ENV
4750
echo "RELEASE_ARTIFACT=$RELEASE_NAME" >> $GITHUB_ENV

0 commit comments

Comments
 (0)