mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 11:36:11 +01:00
add possibility to add multiple templates
This commit is contained in:
parent
59040df378
commit
023f8af588
5 changed files with 10 additions and 6 deletions
|
|
@ -21,7 +21,7 @@ fi
|
|||
sed -i direnvrc \
|
||||
-e 's!\(declare major=\).*\( # UPDATE(nix-direnv version)\)!\1'"${ver[0]@Q} minor=${ver[1]@Q} patch=${ver[2]@Q}"'\2!'
|
||||
|
||||
sed -i README.md template/.envrc \
|
||||
sed -i README.md templates/flake/.envrc \
|
||||
-e 's!\(nix-direnv/\).*\(/direnvrc\)!\1'"${version}"'\2!' \
|
||||
-e 's?\( ! nix_direnv_version \)[0-9.]\+\(; \)?\1'"${version}"'\2?'
|
||||
git add README.md direnvrc
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ cd "$SCRIPT_DIR/.."
|
|||
tag=$(curl --silent "https://api.github.com/repos/nix-community/nix-direnv/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||
sha256=$(direnv fetchurl "https://raw.githubusercontent.com/nix-community/nix-direnv/${tag}/direnvrc" | grep -m1 -o 'sha256-.*')
|
||||
|
||||
sed -i README.md template/.envrc -e "s!sha256-.*!${sha256}\"!"
|
||||
git add README.md template/.envrc
|
||||
sed -i README.md templates/flake/.envrc -e "s!sha256-.*!${sha256}\"!"
|
||||
git add README.md templates/flake/.envrc
|
||||
git commit -m "update fetchurl checksum"
|
||||
#git push
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue