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. "-p cdk-js"
  13. )
  14. for arg in "${buildargs[@]}"; do
  15. echo "Checking '$arg'"
  16. cargo check $arg {{ARGS}}
  17. echo
  18. done
  19. run-examples:
  20. cargo r --example p2pk
  21. cargo r --example mint-token
  22. cargo r --example proof_selection
  23. cargo r --example wallet
  24. clippy-each:
  25. #!/usr/bin/env bash
  26. set -euo pipefail
  27. buildargs=(
  28. "-p cdk-integration-tests"
  29. "-p cdk"
  30. "-p cdk --no-default-features"
  31. "-p cdk --no-default-features --features wallet"
  32. "-p cdk --no-default-features --features mint"
  33. "-p cdk-redb"
  34. "-p cdk-redb --no-default-features --features wallet"
  35. "-p cdk-redb --no-default-features --features mint"
  36. "-p cdk-sqlite --no-default-features --features mint"
  37. "-p cdk-sqlite --no-default-features --features wallet"
  38. "-p cdk-cln"
  39. "-p cdk-axum"
  40. "-p cdk-fake-wallet"
  41. "-p cdk-strike"
  42. "-p cdk-lnd"
  43. "--bin cdk-cli"
  44. "--bin cdk-mintd"
  45. )
  46. for arg in "${buildargs[@]}"; do
  47. echo "Checking '$arg'"
  48. cargo check $arg
  49. cargo clippy $arg -- -D warnings
  50. echo
  51. done
  52. release m="":
  53. #!/usr/bin/env bash
  54. set -euo pipefail
  55. args=(
  56. "-p cdk-redb"
  57. "-p cdk-sqlite"
  58. "-p cdk-axum"
  59. "-p cdk-rexie"
  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