mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 11:36:11 +01:00
script/create-release.sh: better flow
This commit is contained in:
parent
f61363612d
commit
87c354518c
2 changed files with 4 additions and 5 deletions
|
|
@ -28,6 +28,4 @@ git add README.md direnvrc templates/flake/.envrc
|
||||||
git commit -m "bump version ${version}"
|
git commit -m "bump version ${version}"
|
||||||
git tag -e "${version}"
|
git tag -e "${version}"
|
||||||
|
|
||||||
echo "now run 'git push --tags origin master'"
|
echo "now run 'git push --tags origin master && ./scripts/update-checksum.sh'"
|
||||||
echo "Than create a release: https://github.com/nix-community/nix-direnv/releases"
|
|
||||||
echo "and run ./scripts/update-checksum.sh"
|
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,11 @@ set -euo pipefail
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||||
cd "$SCRIPT_DIR/.."
|
cd "$SCRIPT_DIR/.."
|
||||||
|
|
||||||
tag=$(curl --silent "https://api.github.com/repos/nix-community/nix-direnv/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
tag=$(git describe --tags | cut -d- -f1)
|
||||||
sha256=$(direnv fetchurl "https://raw.githubusercontent.com/nix-community/nix-direnv/${tag}/direnvrc" | grep -m1 -o 'sha256-.*')
|
sha256=$(direnv fetchurl "https://raw.githubusercontent.com/nix-community/nix-direnv/${tag}/direnvrc" | grep -m1 -o 'sha256-.*')
|
||||||
|
|
||||||
sed -i README.md templates/flake/.envrc -e "s!sha256-.*!${sha256}\"!"
|
sed -i README.md templates/flake/.envrc -e "s!sha256-.*!${sha256}\"!"
|
||||||
git add README.md templates/flake/.envrc
|
git add README.md templates/flake/.envrc
|
||||||
git commit -m "update fetchurl checksum"
|
git commit -m "update fetchurl checksum"
|
||||||
#git push
|
echo "Now run: git push"
|
||||||
|
echo "And create a release at https://github.com/nix-community/nix-direnv/releases for version ${tag}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue