-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from elsirion/flakebox
flakebox
- Loading branch information
Showing
11 changed files
with
272 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
7f694652756ea26511ac7b4509c7ba6b79c81856687e4d51fe93508f3c04e43bfe71f1eebebd3167395b4f9ed222b6dd93594998512e24720d6fd306386b128b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.