justfile 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663
  1. alias b := build
  2. alias c := check
  3. alias t := test
  4. default:
  5. @just --list
  6. # Create a new SQL migration file
  7. new-migration target name:
  8. #!/usr/bin/env bash
  9. set -euo pipefail
  10. if [ "{{target}}" != "mint" ] && [ "{{target}}" != "wallet" ]; then
  11. echo "Error: target must be either 'mint' or 'wallet'"
  12. exit 1
  13. fi
  14. timestamp=$(date +%Y%m%d%H%M%S)
  15. migration_path="./crates/cdk-sql-common/src/{{target}}/migrations/${timestamp}_{{name}}.sql"
  16. # Create the file
  17. mkdir -p "$(dirname "$migration_path")"
  18. touch "$migration_path"
  19. echo "Created new migration: $migration_path"
  20. final-check: typos format clippy test
  21. # run `cargo build` on everything
  22. build *ARGS="--workspace --all-targets":
  23. #!/usr/bin/env bash
  24. set -euo pipefail
  25. if [ ! -f Cargo.toml ]; then
  26. cd {{invocation_directory()}}
  27. fi
  28. cargo build {{ARGS}}
  29. # run `cargo check` on everything
  30. check *ARGS="--workspace --all-targets":
  31. #!/usr/bin/env bash
  32. set -euo pipefail
  33. if [ ! -f Cargo.toml ]; then
  34. cd {{invocation_directory()}}
  35. fi
  36. cargo check {{ARGS}}
  37. # run code formatters
  38. format:
  39. #!/usr/bin/env bash
  40. set -euo pipefail
  41. if [ ! -f Cargo.toml ]; then
  42. cd {{invocation_directory()}}
  43. fi
  44. cargo fmt --all
  45. nixpkgs-fmt $(echo **.nix)
  46. # run doc tests
  47. test:
  48. #!/usr/bin/env bash
  49. set -euo pipefail
  50. if [ ! -f Cargo.toml ]; then
  51. cd {{invocation_directory()}}
  52. fi
  53. cargo test --lib --workspace --exclude cdk-postgres
  54. # Run pure integration tests
  55. cargo test -p cdk-integration-tests --test mint
  56. # run doc tests
  57. test-pure db="memory":
  58. #!/usr/bin/env bash
  59. set -euo pipefail
  60. if [ ! -f Cargo.toml ]; then
  61. cd {{invocation_directory()}}
  62. fi
  63. # Run pure integration tests (cargo test will only build what's needed for the test)
  64. CDK_TEST_DB_TYPE={{db}} cargo test -p cdk-integration-tests --test integration_tests_pure -- --test-threads 1
  65. # Run swap flow tests (detailed testing of swap operation)
  66. CDK_TEST_DB_TYPE={{db}} cargo test -p cdk-integration-tests --test test_swap_flow -- --test-threads 1
  67. test-all db="memory":
  68. #!/usr/bin/env bash
  69. set -euo pipefail
  70. just test {{db}}
  71. bash ./misc/itests.sh "{{db}}"
  72. bash ./misc/fake_itests.sh "{{db}}" external_signatory
  73. bash ./misc/fake_itests.sh "{{db}}"
  74. # Mutation Testing Commands
  75. # Run mutation tests on a specific crate
  76. # Usage: just mutants <crate-name>
  77. # Example: just mutants cashu
  78. mutants CRATE:
  79. #!/usr/bin/env bash
  80. set -euo pipefail
  81. echo "Running mutation tests on crate: {{CRATE}}"
  82. cargo mutants --package {{CRATE}} -vV
  83. # Run mutation tests on the cashu crate
  84. mutants-cashu:
  85. #!/usr/bin/env bash
  86. set -euo pipefail
  87. echo "Running mutation tests on cashu crate..."
  88. cargo mutants --package cashu -vV
  89. # Run mutation tests on the cdk crate
  90. mutants-cdk:
  91. #!/usr/bin/env bash
  92. set -euo pipefail
  93. echo "Running mutation tests on cdk crate..."
  94. cargo mutants --package cdk -vV
  95. # Run mutation tests on entire workspace (WARNING: very slow)
  96. mutants-all:
  97. #!/usr/bin/env bash
  98. set -euo pipefail
  99. echo "Running mutation tests on entire workspace..."
  100. echo "WARNING: This may take a very long time!"
  101. cargo mutants -vV
  102. # Quick mutation test for current work (alias for mutants-diff)
  103. mutants-quick:
  104. #!/usr/bin/env bash
  105. set -euo pipefail
  106. echo "Running mutations on changed files since HEAD..."
  107. cargo mutants --in-diff HEAD -vV
  108. # Run mutation tests only on changed code since HEAD
  109. mutants-diff:
  110. #!/usr/bin/env bash
  111. set -euo pipefail
  112. echo "Running mutation tests on changed code..."
  113. cargo mutants --in-diff HEAD -vV
  114. # Run mutation tests and save output to log file
  115. # Usage: just mutants-log <crate-name> <log-suffix>
  116. # Example: just mutants-log cashu baseline
  117. mutants-log CRATE SUFFIX:
  118. #!/usr/bin/env bash
  119. set -euo pipefail
  120. if [ ! -f Cargo.toml ]; then
  121. cd {{invocation_directory()}}
  122. fi
  123. LOG_FILE="mutants-{{CRATE}}-{{SUFFIX}}.log"
  124. echo "Running mutation tests on {{CRATE}}, saving to $LOG_FILE..."
  125. cargo mutants --package {{CRATE}} -vV 2>&1 | tee "$LOG_FILE"
  126. echo "Results saved to $LOG_FILE"
  127. # Mutation test with baseline comparison
  128. # Usage: just mutants-check <crate-name>
  129. # Example: just mutants-check cashu
  130. mutants-check CRATE:
  131. #!/usr/bin/env bash
  132. set -euo pipefail
  133. BASELINE="mutants-{{CRATE}}-baseline.log"
  134. if [ ! -f "$BASELINE" ]; then
  135. echo "ERROR: No baseline found at $BASELINE"
  136. echo "Run: just mutants-log {{CRATE}} baseline"
  137. exit 1
  138. fi
  139. cargo mutants --package {{CRATE}} -vV | tee mutants-{{CRATE}}-current.log
  140. # Compare results
  141. echo "=== Baseline vs Current ==="
  142. diff <(grep "^CAUGHT\|^MISSED" "$BASELINE" | wc -l) \
  143. <(grep "^CAUGHT\|^MISSED" mutants-{{CRATE}}-current.log | wc -l) || true
  144. test-nutshell:
  145. #!/usr/bin/env bash
  146. set -euo pipefail
  147. # Function to cleanup docker containers
  148. cleanup() {
  149. echo "Cleaning up docker containers..."
  150. docker stop nutshell 2>/dev/null || true
  151. docker rm nutshell 2>/dev/null || true
  152. unset CDK_ITESTS_DIR
  153. }
  154. # Trap to ensure cleanup happens on exit (success or failure)
  155. trap cleanup EXIT
  156. # Clean up any leftover containers from previous runs
  157. docker stop nutshell 2>/dev/null || true
  158. docker rm nutshell 2>/dev/null || true
  159. docker run -d --network=host --name nutshell -e MINT_LIGHTNING_BACKEND=FakeWallet -e MINT_LISTEN_HOST=0.0.0.0 -e MINT_LISTEN_PORT=3338 -e MINT_PRIVATE_KEY=TEST_PRIVATE_KEY -e MINT_INPUT_FEE_PPK=100 cashubtc/nutshell:latest poetry run mint
  160. export CDK_ITESTS_DIR=$(mktemp -d)
  161. # Wait for the Nutshell service to be ready
  162. echo "Waiting for Nutshell to start..."
  163. max_attempts=30
  164. attempt=0
  165. while ! curl -s http://127.0.0.1:3338/v1/info > /dev/null; do
  166. attempt=$((attempt+1))
  167. if [ $attempt -ge $max_attempts ]; then
  168. echo "Nutshell failed to start after $max_attempts attempts"
  169. echo "=== Docker container status ==="
  170. docker ps -a --filter name=nutshell
  171. echo "=== Docker logs ==="
  172. docker logs nutshell 2>&1 || true
  173. exit 1
  174. fi
  175. echo "Waiting for Nutshell to start (attempt $attempt/$max_attempts)..."
  176. # Show container status every 10 attempts
  177. if [ $((attempt % 10)) -eq 0 ]; then
  178. echo "=== Container status check ==="
  179. docker ps -a --filter name=nutshell
  180. fi
  181. sleep 1
  182. done
  183. echo "Nutshell is ready!"
  184. # Set environment variables and run tests
  185. export CDK_TEST_MINT_URL=http://127.0.0.1:3338
  186. export LN_BACKEND=FAKEWALLET
  187. # Track test results
  188. test_exit_code=0
  189. # Run first test and capture exit code
  190. echo "Running happy_path_mint_wallet test..."
  191. if ! cargo test -p cdk-integration-tests --test happy_path_mint_wallet; then
  192. echo "ERROR: happy_path_mint_wallet test failed"
  193. test_exit_code=1
  194. fi
  195. # Run second test and capture exit code
  196. echo "Running test_fees test..."
  197. if ! cargo test -p cdk-integration-tests --test test_fees; then
  198. echo "ERROR: test_fees test failed"
  199. test_exit_code=1
  200. fi
  201. unset CDK_TEST_MINT_URL
  202. unset LN_BACKEND
  203. # Exit with error code if any test failed
  204. if [ $test_exit_code -ne 0 ]; then
  205. echo "One or more tests failed"
  206. exit $test_exit_code
  207. fi
  208. echo "All tests passed successfully"
  209. # run `cargo clippy` on everything
  210. clippy *ARGS="--workspace --all-targets":
  211. cargo clippy {{ARGS}} -- -D warnings
  212. # run `cargo clippy --fix` on everything
  213. clippy-fix *ARGS="--workspace --all-targets":
  214. cargo clippy {{ARGS}} --fix
  215. typos:
  216. typos
  217. # fix all typos
  218. [no-exit-message]
  219. typos-fix:
  220. just typos -w
  221. # Goose AI Recipe Commands
  222. # Update changelog from staged changes using Goose AI
  223. goose-git-msg:
  224. #!/usr/bin/env bash
  225. set -euo pipefail
  226. goose run --recipe ./misc/recipes/git-commit-message.yaml --interactive
  227. # Create git message from staged changes using Goose AI
  228. goose-changelog-staged:
  229. #!/usr/bin/env bash
  230. set -euo pipefail
  231. goose run --recipe ./misc/recipes/changelog-update.yaml --interactive
  232. # Update changelog from recent commits using Goose AI
  233. # Usage: just goose-changelog-commits [number_of_commits]
  234. goose-changelog-commits *COMMITS="5":
  235. #!/usr/bin/env bash
  236. set -euo pipefail
  237. COMMITS={{COMMITS}} goose run --recipe ./misc/recipes/changelog-from-commits.yaml --interactive
  238. itest db:
  239. #!/usr/bin/env bash
  240. set -euo pipefail
  241. bash ./misc/itests.sh "{{db}}"
  242. fake-mint-itest db:
  243. #!/usr/bin/env bash
  244. set -euo pipefail
  245. bash ./misc/fake_itests.sh "{{db}}"
  246. bash ./misc/fake_itests.sh "{{db}}" external_signatory
  247. itest-payment-processor ln:
  248. #!/usr/bin/env bash
  249. set -euo pipefail
  250. bash ./misc/mintd_payment_processor.sh "{{ln}}"
  251. fake-auth-mint-itest db openid_discovery:
  252. #!/usr/bin/env bash
  253. set -euo pipefail
  254. bash ./misc/fake_auth_itests.sh "{{db}}" "{{openid_discovery}}"
  255. nutshell-wallet-itest:
  256. #!/usr/bin/env bash
  257. set -euo pipefail
  258. bash ./misc/nutshell_wallet_itest.sh
  259. # Start interactive regtest environment (Bitcoin + 4 LN nodes + 2 CDK mints)
  260. regtest db="sqlite":
  261. #!/usr/bin/env bash
  262. set -euo pipefail
  263. bash ./misc/interactive_regtest_mprocs.sh {{db}}
  264. # Lightning Network Commands (require regtest environment to be running)
  265. # Get CLN node 1 info
  266. ln-cln1 *ARGS:
  267. #!/usr/bin/env bash
  268. set -euo pipefail
  269. bash ./misc/regtest_helper.sh ln-cln1 {{ARGS}}
  270. # Get CLN node 2 info
  271. ln-cln2 *ARGS:
  272. #!/usr/bin/env bash
  273. set -euo pipefail
  274. bash ./misc/regtest_helper.sh ln-cln2 {{ARGS}}
  275. # Get LND node 1 info
  276. ln-lnd1 *ARGS:
  277. #!/usr/bin/env bash
  278. set -euo pipefail
  279. bash ./misc/regtest_helper.sh ln-lnd1 {{ARGS}}
  280. # Get LND node 2 info
  281. ln-lnd2 *ARGS:
  282. #!/usr/bin/env bash
  283. set -euo pipefail
  284. bash ./misc/regtest_helper.sh ln-lnd2 {{ARGS}}
  285. # Bitcoin regtest commands
  286. btc *ARGS:
  287. #!/usr/bin/env bash
  288. set -euo pipefail
  289. bash ./misc/regtest_helper.sh btc {{ARGS}}
  290. # Mine blocks in regtest
  291. btc-mine blocks="10":
  292. #!/usr/bin/env bash
  293. set -euo pipefail
  294. bash ./misc/regtest_helper.sh btc-mine {{blocks}}
  295. # Show mint information
  296. mint-info:
  297. #!/usr/bin/env bash
  298. set -euo pipefail
  299. bash ./misc/regtest_helper.sh mint-info
  300. # Run integration tests against regtest environment
  301. mint-test:
  302. #!/usr/bin/env bash
  303. set -euo pipefail
  304. bash ./misc/regtest_helper.sh mint-test
  305. # Restart mints after recompiling (useful for development)
  306. restart-mints:
  307. #!/usr/bin/env bash
  308. set -euo pipefail
  309. bash ./misc/regtest_helper.sh restart-mints
  310. # Show regtest environment status
  311. regtest-status:
  312. #!/usr/bin/env bash
  313. set -euo pipefail
  314. bash ./misc/regtest_helper.sh show-status
  315. # Show regtest environment logs
  316. regtest-logs:
  317. #!/usr/bin/env bash
  318. set -euo pipefail
  319. bash ./misc/regtest_helper.sh show-logs
  320. run-examples:
  321. cargo r --example p2pk
  322. cargo r --example mint-token
  323. cargo r --example melt-token
  324. cargo r --example proof_selection
  325. cargo r --example wallet
  326. check-wasm *ARGS="--target wasm32-unknown-unknown":
  327. #!/usr/bin/env bash
  328. set -euo pipefail
  329. if [ ! -f Cargo.toml ]; then
  330. cd {{invocation_directory()}}
  331. fi
  332. buildargs=(
  333. "-p cdk"
  334. "-p cdk --no-default-features"
  335. "-p cdk --no-default-features --features wallet"
  336. "-p cdk --no-default-features --features mint"
  337. )
  338. for arg in "${buildargs[@]}"; do
  339. echo "Checking '$arg'"
  340. cargo check $arg {{ARGS}}
  341. echo
  342. done
  343. release m="":
  344. #!/usr/bin/env bash
  345. set -euo pipefail
  346. args=(
  347. "-p cashu"
  348. "-p cdk-prometheus"
  349. "-p cdk-common"
  350. "-p cdk-sql-common"
  351. "-p cdk-sqlite"
  352. "-p cdk-postgres"
  353. "-p cdk-redb"
  354. "-p cdk-signatory"
  355. "-p cdk-fake-wallet"
  356. "-p cdk"
  357. "-p cdk-ffi"
  358. "-p cdk-axum"
  359. "-p cdk-mint-rpc"
  360. "-p cdk-cln"
  361. "-p cdk-lnd"
  362. "-p cdk-lnbits"
  363. "-p cdk-ldk-node"
  364. "-p cdk-payment-processor"
  365. "-p cdk-cli"
  366. "-p cdk-mintd"
  367. )
  368. for arg in "${args[@]}";
  369. do
  370. echo "Publishing '$arg'"
  371. cargo publish $arg {{m}}
  372. echo
  373. done
  374. # Extract version from the cdk-ffi crate
  375. VERSION=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "cdk-ffi") | .version')
  376. # Trigger Swift package release after Rust crates are published
  377. echo "📦 Triggering Swift package release for version $VERSION..."
  378. just ffi-release-swift $VERSION
  379. check-docs:
  380. #!/usr/bin/env bash
  381. set -euo pipefail
  382. args=(
  383. "-p cashu"
  384. "-p cdk-common"
  385. "-p cdk-sql-common"
  386. "-p cdk"
  387. "-p cdk-redb"
  388. "-p cdk-sqlite"
  389. "-p cdk-axum"
  390. "-p cdk-cln"
  391. "-p cdk-lnd"
  392. "-p cdk-lnbits"
  393. "-p cdk-fake-wallet"
  394. "-p cdk-mint-rpc"
  395. "-p cdk-payment-processor"
  396. "-p cdk-signatory"
  397. "-p cdk-cli"
  398. "-p cdk-mintd"
  399. )
  400. for arg in "${args[@]}"; do
  401. echo "Checking '$arg' docs"
  402. cargo doc $arg --all-features
  403. echo
  404. done
  405. # Build docs for all crates and error on warnings
  406. docs-strict:
  407. #!/usr/bin/env bash
  408. set -euo pipefail
  409. args=(
  410. "-p cashu"
  411. "-p cdk-common"
  412. "-p cdk-sql-common"
  413. "-p cdk"
  414. "-p cdk-redb"
  415. "-p cdk-sqlite"
  416. "-p cdk-axum"
  417. "-p cdk-cln"
  418. "-p cdk-lnd"
  419. "-p cdk-lnbits"
  420. "-p cdk-fake-wallet"
  421. "-p cdk-mint-rpc"
  422. "-p cdk-payment-processor"
  423. "-p cdk-signatory"
  424. "-p cdk-cli"
  425. "-p cdk-mintd"
  426. )
  427. for arg in "${args[@]}"; do
  428. echo "Building docs for $arg with strict warnings"
  429. RUSTDOCFLAGS="-D warnings" cargo doc $arg --all-features --no-deps
  430. echo
  431. done
  432. # =============================================================================
  433. # FFI Commands - CDK Foreign Function Interface bindings
  434. # =============================================================================
  435. # Helper function to get library extension based on platform
  436. _ffi-lib-ext:
  437. #!/usr/bin/env bash
  438. if [[ "$OSTYPE" == "darwin"* ]]; then
  439. echo "dylib"
  440. else
  441. echo "so"
  442. fi
  443. # Build the FFI library
  444. ffi-build *ARGS="--release":
  445. cargo build {{ARGS}} --package cdk-ffi --features postgres
  446. # Generate bindings for a specific language
  447. ffi-generate LANGUAGE *ARGS="--release": ffi-build
  448. #!/usr/bin/env bash
  449. set -euo pipefail
  450. LANG="{{LANGUAGE}}"
  451. # Validate language
  452. case "$LANG" in
  453. python|swift|kotlin)
  454. ;;
  455. *)
  456. echo "❌ Unsupported language: $LANG"
  457. echo "Supported languages: python, swift, kotlin"
  458. exit 1
  459. ;;
  460. esac
  461. # Set emoji and build type
  462. case "$LANG" in
  463. python) EMOJI="🐍" ;;
  464. swift) EMOJI="🍎" ;;
  465. kotlin) EMOJI="🎯" ;;
  466. esac
  467. # Determine build type and library path
  468. if [[ "{{ARGS}}" == *"--release"* ]] || [[ "{{ARGS}}" == "" ]]; then
  469. BUILD_TYPE="release"
  470. else
  471. BUILD_TYPE="debug"
  472. cargo build --package cdk-ffi --features postgres
  473. fi
  474. LIB_EXT=$(just _ffi-lib-ext)
  475. echo "$EMOJI Generating $LANG bindings..."
  476. mkdir -p target/bindings/$LANG
  477. cargo run --bin uniffi-bindgen generate \
  478. --library target/$BUILD_TYPE/libcdk_ffi.$LIB_EXT \
  479. --language $LANG \
  480. --out-dir target/bindings/$LANG
  481. echo "✅ $LANG bindings generated in target/bindings/$LANG/"
  482. # Generate Python bindings (shorthand)
  483. ffi-generate-python *ARGS="--release":
  484. just ffi-generate python {{ARGS}}
  485. # Generate Swift bindings (shorthand)
  486. ffi-generate-swift *ARGS="--release":
  487. just ffi-generate swift {{ARGS}}
  488. # Generate Kotlin bindings (shorthand)
  489. ffi-generate-kotlin *ARGS="--release":
  490. just ffi-generate kotlin {{ARGS}}
  491. # Generate bindings for all supported languages
  492. ffi-generate-all *ARGS="--release": ffi-build
  493. @echo "🔧 Generating UniFFI bindings for all languages..."
  494. just ffi-generate python {{ARGS}}
  495. just ffi-generate swift {{ARGS}}
  496. just ffi-generate kotlin {{ARGS}}
  497. @echo "✅ All bindings generated successfully!"
  498. # Run Python FFI tests
  499. ffi-test: ffi-generate-python
  500. #!/usr/bin/env bash
  501. set -euo pipefail
  502. echo "🧪 Running Python FFI tests..."
  503. python3 crates/cdk-ffi/tests/test_transactions.py
  504. python3 crates/cdk-ffi/tests/test_kvstore.py
  505. echo "✅ Tests completed!"
  506. # Build debug version and generate Python bindings quickly (for development)
  507. ffi-dev-python:
  508. #!/usr/bin/env bash
  509. set -euo pipefail
  510. # Generate Python bindings first
  511. just ffi-generate python --debug
  512. # Copy library to Python bindings directory
  513. LIB_EXT=$(just _ffi-lib-ext)
  514. echo "📦 Copying library to Python bindings directory..."
  515. cp target/debug/libcdk_ffi.$LIB_EXT target/bindings/python/
  516. # Launch Python REPL with CDK FFI loaded
  517. cd target/bindings/python
  518. echo "🐍 Launching Python REPL with CDK FFI library loaded..."
  519. echo "💡 The 'cdk_ffi' module is pre-imported and ready to use!"
  520. python3 -i -c "from cdk_ffi import *; print('✅ CDK FFI library loaded successfully!');"
  521. # Test language bindings with a simple import
  522. ffi-test-bindings LANGUAGE: (ffi-generate LANGUAGE "--debug")
  523. #!/usr/bin/env bash
  524. set -euo pipefail
  525. LANG="{{LANGUAGE}}"
  526. LIB_EXT=$(just _ffi-lib-ext)
  527. echo "📦 Copying library to $LANG bindings directory..."
  528. cp target/debug/libcdk_ffi.$LIB_EXT target/bindings/$LANG/
  529. cd target/bindings/$LANG
  530. echo "🧪 Testing $LANG bindings..."
  531. case "$LANG" in
  532. python)
  533. python3 -c "import cdk_ffi; print('✅ Python bindings work!')"
  534. ;;
  535. *)
  536. echo "✅ $LANG bindings generated (manual testing required)"
  537. ;;
  538. esac
  539. # Test Python bindings (shorthand)
  540. ffi-test-python:
  541. just ffi-test-bindings python
  542. # Trigger Swift Package release workflow
  543. ffi-release-swift VERSION:
  544. #!/usr/bin/env bash
  545. set -euo pipefail
  546. echo "🚀 Triggering Publish Swift Package workflow..."
  547. echo " Version: {{VERSION}}"
  548. echo " CDK Ref: v{{VERSION}}"
  549. # Trigger the workflow using GitHub CLI
  550. gh workflow run "Publish Swift Package" \
  551. --repo cashubtc/cdk-swift \
  552. --field version="{{VERSION}}" \
  553. --field cdk_repo="cashubtc/cdk" \
  554. --field cdk_ref="v{{VERSION}}"
  555. echo "✅ Workflow triggered successfully!"