Skip to content

Commit

Permalink
Merge pull request #56 from elsirion/flakebox
Browse files Browse the repository at this point in the history
flakebox
  • Loading branch information
elsirion authored Feb 12, 2024
2 parents 2f5b243 + ec0a32b commit 69175b8
Show file tree
Hide file tree
Showing 11 changed files with 272 additions and 225 deletions.
12 changes: 12 additions & 0 deletions .config/flakebox/bin/flakebox-in-each-cargo-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Run a given command in every directory that contains cargo workspace
# Right now it just scans for `Cargo.lock`

set -euo pipefail

find . -name Cargo.lock | while read -r path ; do
(
cd "$(dirname "$path")"
"$@"
)
done
1 change: 1 addition & 0 deletions .config/flakebox/id
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7f694652756ea26511ac7b4509c7ba6b79c81856687e4d51fe93508f3c04e43bfe71f1eebebd3167395b4f9ed222b6dd93594998512e24720d6fd306386b128b
32 changes: 32 additions & 0 deletions .config/flakebox/shellHook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
root="$(git rev-parse --show-toplevel)"
dot_git="$(git rev-parse --git-common-dir)"
if [[ ! -d "${dot_git}/hooks" ]]; then mkdir -p "${dot_git}/hooks"; fi
# fix old bug
rm -f "${dot_git}/hooks/comit-msg"
rm -f "${dot_git}/hooks/commit-msg"
ln -sf "${root}/misc/git-hooks/commit-msg" "${dot_git}/hooks/commit-msg"

root="$(git rev-parse --show-toplevel)"
dot_git="$(git rev-parse --git-common-dir)"
if [[ ! -d "${dot_git}/hooks" ]]; then mkdir -p "${dot_git}/hooks"; fi
# fix old bug
rm -f "${dot_git}/hooks/pre-comit"
rm -f "${dot_git}/hooks/pre-commit"
ln -sf "${root}/misc/git-hooks/pre-commit" "${dot_git}/hooks/pre-commit"

# set template
git config commit.template misc/git-hooks/commit-template.txt

if ! flakebox lint --silent; then
>&2 echo "ℹ️ Project recommendations detected. Run 'flakebox lint' for more info."
fi

if [ -n "${DIRENV_IN_ENVRC:-}" ]; then
# and not set DIRENV_LOG_FORMAT
if [ -n "${DIRENV_LOG_FORMAT:-}" ]; then
>&2 echo "💡 Set 'DIRENV_LOG_FORMAT=\"\"' in your shell environment variables for a cleaner output of direnv"
fi
fi

>&2 echo "💡 Run 'just' for a list of available 'just ...' helper recipes"
4 changes: 4 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
group_imports = "StdExternalCrate"
wrap_comments = true
format_code_in_doc_comments = true
imports_granularity = "Module"
70 changes: 35 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "fedimint-leptos-test"
name = "webimint"
version = "0.1.0"
edition = "2021"

Expand All @@ -8,6 +8,12 @@ edition = "2021"
[profile.release]
opt-level = 'z'

[profile.ci]
inherits = "dev"
incremental = false
debug = "line-tables-only"
lto = "off"

[dependencies]
async-trait = "0.1.68"
anyhow = "1.0.71"
Expand Down Expand Up @@ -43,4 +49,4 @@ gloo-storage = "0.3.0"
rand = "0.8.5"

[build-dependencies]
fedimint-build = "0.2.1-rc1"
fedimint-build = "0.2.1-rc1"
Loading

0 comments on commit 69175b8

Please sign in to comment.