-
Notifications
You must be signed in to change notification settings - Fork 1
/
do-build.sh
36 lines (25 loc) · 1.08 KB
/
do-build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
set -e
export BUILD_ROOT=`pwd`
# It is assumed that the patched version of duckdb is built
# under this directory called duckdb
# It is also assumed the patched duckdb-rs is present in the
# current directory under duckdb-rs
export DUCKDB_LIB_DIR="$BUILD_ROOT/duckdb/build/debug/src/"
export DUCKDB_INCLUDE_DIR="$BUILD_ROOT/duckdb/src/include/"
cargo build
EXTENSION_FILE=./target/debug/libcrontab.duckdb_extension
cp ./target/debug/libcrontab.dylib $EXTENSION_FILE
/bin/echo -n "osx_arm64" > duckdb_platform_out
install_name_tool -add_rpath $BUILD_ROOT/duckdb/build/debug/src/ \
$EXTENSION_FILE
# There needs to be some signing step performed here to add metadata to the extension.
cmake -DEXTENSION=$EXTENSION_FILE \
-DDUCKDB_VERSION="2f818ce50d" \
-DEXTENSION_VERSION="0.0.1" \
-DPLATFORM_FILE=./duckdb_platform_out \
-DNULL_FILE=./duckdb/scripts/null.txt \
-P ./duckdb/scripts/append_metadata.cmake
$BUILD_ROOT/duckdb/build/debug/duckdb \
-unsigned \
-c "load '$EXTENSION_FILE'; select * from cron('5 * * * *', start=get_current_timestamp(), until=date '2028-08-20'); "