justfile.custom.just 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. check-wasm *ARGS="--target wasm32-unknown-unknown":
  2. #!/usr/bin/env bash
  3. set -euo pipefail
  4. if [ ! -f Cargo.toml ]; then
  5. cd {{invocation_directory()}}
  6. fi
  7. buildargs=(
  8. "-p cdk"
  9. "-p cdk --no-default-features"
  10. "-p cdk --no-default-features --features wallet"
  11. "-p cdk --no-default-features --features mint"
  12. )
  13. for arg in "${buildargs[@]}"; do
  14. echo "Checking '$arg'"
  15. cargo check $arg {{ARGS}}
  16. echo
  17. done
  18. run-examples:
  19. cargo r --example p2pk
  20. cargo r --example mint-token
  21. cargo r --example proof_selection
  22. cargo r --example wallet
  23. clippy-each:
  24. #!/usr/bin/env bash
  25. set -euo pipefail
  26. buildargs=(
  27. "-p cashu --no-default-features"
  28. "-p cashu --no-default-features --features wallet"
  29. "-p cashu --no-default-features --features mint"
  30. "-p cdk-common --no-default-features"
  31. "-p cdk-common --no-default-features --features wallet"
  32. "-p cdk-common --no-default-features --features mint"
  33. "-p cdk-integration-tests"
  34. "-p cdk"
  35. "-p cdk --no-default-features"
  36. "-p cdk --no-default-features --features wallet"
  37. "-p cdk --no-default-features --features mint"
  38. "-p cdk-redb"
  39. "-p cdk-redb --no-default-features --features wallet"
  40. "-p cdk-redb --no-default-features --features mint"
  41. "-p cdk-sqlite --no-default-features --features mint"
  42. "-p cdk-sqlite --no-default-features --features wallet"
  43. "-p cdk-cln"
  44. "-p cdk-axum"
  45. "-p cdk-fake-wallet"
  46. "-p cdk-strike"
  47. "-p cdk-lnd"
  48. "-p cdk-mint-rpc"
  49. "--bin cdk-cli"
  50. "--bin cdk-mintd"
  51. )
  52. for arg in "${buildargs[@]}"; do
  53. echo "Checking '$arg'"
  54. cargo check $arg
  55. cargo clippy $arg -- -D warnings
  56. echo
  57. done
  58. release m="":
  59. #!/usr/bin/env bash
  60. set -euo pipefail
  61. args=(
  62. "-p cashu"
  63. "-p cdk-common"
  64. "-p cdk"
  65. "-p cdk-redb"
  66. "-p cdk-sqlite"
  67. "-p cdk-rexie"
  68. "-p cdk-axum"
  69. "-p cdk-mint-rpc"
  70. "-p cdk-cln"
  71. "-p cdk-lnd"
  72. "-p cdk-strike"
  73. "-p cdk-phoenixd"
  74. "-p cdk-lnbits"
  75. "-p cdk-fake-wallet"
  76. "-p cdk-cli"
  77. "-p cdk-mintd"
  78. )
  79. for arg in "${args[@]}";
  80. do
  81. echo "Publishing '$arg'"
  82. cargo publish $arg {{m}}
  83. echo
  84. done
  85. check-docs:
  86. #!/usr/bin/env bash
  87. set -euo pipefail
  88. args=(
  89. "-p cashu"
  90. "-p cdk-common"
  91. "-p cdk"
  92. "-p cdk-redb"
  93. "-p cdk-sqlite"
  94. "-p cdk-axum"
  95. "-p cdk-rexie"
  96. "-p cdk-cln"
  97. "-p cdk-lnd"
  98. "-p cdk-strike"
  99. "-p cdk-phoenixd"
  100. "-p cdk-lnbits"
  101. "-p cdk-fake-wallet"
  102. "-p cdk-mint-rpc"
  103. "-p cdk-cli"
  104. "-p cdk-mintd"
  105. )
  106. for arg in "${args[@]}"; do
  107. echo "Checking '$arg' docs"
  108. cargo doc $arg --all-features
  109. echo
  110. done