Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
Replace .envrc with a just recipe to install a default
✗ CI failure Richard Levitte committed 16 days ago
commit d583e5595d4d5366a25c343550f1c16f97e8a03c
parent 354805aeb3f871358426753198275738ff76a47e
1 failed (1 total) View logs
4 files changed +28 -4
deleted .envrc
@@ -1,3 +0,0 @@
-
watch_file rust-toolchain.toml
-

-
use flake
modified .gitignore
@@ -3,5 +3,5 @@
/build/artifacts
/build/*.tar.gz
/.pre-commit-config.yaml
-
/.direnv/
+
/.envrc
/result
modified justfile
@@ -136,6 +136,7 @@ verify-tool tool package_name="":
# in the patch and prompts for confirmation, preventing arbitrary code execution.
#
# Install git hooks
+
[group('dev')]
[group('hooks')]
install-hooks:
    @SUCCESS="{{SUCCESS}}" NORMAL="{{NORMAL}}" scripts/just/install-hooks.sh "{{hook-script}}" "{{hooks}}"
@@ -144,3 +145,9 @@ install-hooks:
[group('hooks')]
check-hooks:
    @HINT="{{HINT}}" NORMAL="{{NORMAL}}" WARN="{{WARN}}" scripts/just/check-hooks.sh "{{hook-script}}" "{{hooks}}"
+

+
# Install default .envrc (append to existing, if there is one)
+
[group('dev')]
+
[group('nix')]
+
install-envrc:
+
    @SUCCESS="{{SUCCESS}}" NORMAL="{{NORMAL}}" scripts/just/install-default-envrc.sh
added scripts/just/install-default-envrc.sh
@@ -0,0 +1,20 @@
+
#! /usr/bin/env bash
+
set -e
+

+
message="${SUCCESS}.envrc installed${NORMAL}"
+
if [ -f .envrc ]; then
+
    message="${SUCCESS}.envrc updated${NORMAL}"
+
    sed -i~ -e '/^#:begin:default$/,/^#:end:default$/d' .envrc
+
fi
+
cat <<_____ >> .envrc
+
#:begin:default
+
if has nix
+
then
+
  watch_file rust-toolchain.toml
+
  use flake
+
fi
+
#:end:default
+
_____
+

+
echo ""
+
echo "${message}"