justfile.custom.just 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 cdk-integration-tests"
  28. "-p cdk"
  29. "-p cdk --no-default-features"
  30. "-p cdk --no-default-features --features wallet"
  31. "-p cdk --no-default-features --features mint"
  32. "-p cdk-redb"
  33. "-p cdk-redb --no-default-features --features wallet"
  34. "-p cdk-redb --no-default-features --features mint"
  35. "-p cdk-sqlite --no-default-features --features mint"
  36. "-p cdk-sqlite --no-default-features --features wallet"
  37. "-p cdk-cln"
  38. "-p cdk-axum"
  39. "-p cdk-fake-wallet"
  40. "-p cdk-strike"
  41. "-p cdk-lnd"
  42. "--bin cdk-cli"
  43. "--bin cdk-mintd"
  44. )
  45. for arg in "${buildargs[@]}"; do
  46. echo "Checking '$arg'"
  47. cargo check $arg
  48. cargo clippy $arg -- -D warnings
  49. echo
  50. done
  51. release m="":
  52. #!/usr/bin/env bash
  53. set -euo pipefail
  54. args=(
  55. "-p cdk"
  56. "-p cdk-redb"
  57. "-p cdk-sqlite"
  58. "-p cdk-rexie"
  59. "-p cdk-axum"
  60. "-p cdk-cln"
  61. "-p cdk-lnd"
  62. "-p cdk-strike"
  63. "-p cdk-phoenixd"
  64. "-p cdk-lnbits"
  65. "-p cdk-fake-wallet"
  66. "-p cdk-cli"
  67. "-p cdk-mintd"
  68. )
  69. for arg in "${args[@]}";
  70. do
  71. echo "Publishing '$arg'"
  72. cargo publish $arg {{m}}
  73. echo
  74. done
  75. check-docs:
  76. #!/usr/bin/env bash
  77. set -euo pipefail
  78. args=(
  79. "-p cdk"
  80. "-p cdk-redb"
  81. "-p cdk-sqlite"
  82. "-p cdk-axum"
  83. "-p cdk-rexie"
  84. "-p cdk-cln"
  85. "-p cdk-lnd"
  86. "-p cdk-strike"
  87. "-p cdk-phoenixd"
  88. "-p cdk-lnbits"
  89. "-p cdk-fake-wallet"
  90. "-p cdk-cli"
  91. "-p cdk-mintd"
  92. )
  93. for arg in "${args[@]}"; do
  94. echo "Checking '$arg' docs"
  95. cargo doc $arg --all-features
  96. echo
  97. done