File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040 - name : Setup Deno
4141 uses : denoland/setup-deno@v2
4242 with :
43- deno-version : " 2.6.0 "
43+ deno-version : " 2.x "
4444
4545 - name : Configure CMake (Release)
4646 env :
@@ -54,10 +54,10 @@ jobs:
5454
5555 - name : Embed binary as JSON/base64 for JSR
5656 run : |
57- deno run --allow-read --allow-write jsr/scripts/embed_binary.ts \
58- --binaryPath=" build/libcpp_bindings_linux.so" \
59- --target=" linux-x86_64"
60-
57+ ./ jsr/scripts/embed_binary.sh \
58+ build/libcpp_bindings_linux.so \
59+ linux-x86_64
60+
6161 - name : Publish package to JSR (real)
6262 if : github.ref_name == 'main' || startsWith(github.ref, 'refs/tags/')
6363 working-directory : jsr
Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ project(
2626# Generate JSR package metadata from the same git-derived version as the library.
2727# We generate into the build directory to avoid touching tracked files during normal local builds.
2828configure_file (
29- "${CMAKE_SOURCE_DIR} /jsr/jsr.json.in"
30- "${CMAKE_SOURCE_DIR} /jsr/jsr.json"
29+ "${CMAKE_SOURCE_DIR} /jsr/package/ jsr.json.in"
30+ "${CMAKE_SOURCE_DIR} /jsr/package/ jsr.json"
3131 @ONLY
3232)
3333
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ set -eu
3+
4+ BINARY_PATH=" $1 "
5+ TARGET=" $2 "
6+
7+ if [ -z " ${BINARY_PATH:- } " ] || [ -z " ${TARGET:- } " ]; then
8+ echo " Usage: $0 <binaryPath> <target>" >&2
9+ exit 1
10+ fi
11+
12+ JSR_BIN_PATH=" ./jsr/package/bin"
13+
14+ mkdir -p " $JSR_BIN_PATH "
15+
16+ cp " $BINARY_PATH " " $JSR_BIN_PATH /x84_64.so"
17+
18+ # base64 without linebreak (GNU + BSD kompatibel)
19+ BASE64_DATA=" $( base64 " $BINARY_PATH " | tr -d ' \n' ) "
20+
21+ cat > " $JSR_BIN_PATH /x84_64.json" << EOF
22+ {
23+ "target": "$TARGET ",
24+ "filename": "$BINARY_PATH ",
25+ "encoding": "base64",
26+ "data": "$BASE64_DATA "
27+ }
28+ EOF
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments