File: release.sh

package info (click to toggle)
rust-pathfinding 4.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 1,024 kB
  • sloc: sh: 19; makefile: 2
file content (18 lines) | stat: -rwxr-xr-x 515 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /bin/sh
#
# Usage: ./release.sh [arguments to cargo release]

set -e

nix shell nixpkgs#git-extras -c git-changelog -n CHANGELOG.md
changelog=$(mktemp)
awk '/^n/,/^v/{if(/^ /)print}' < CHANGELOG.md > "$changelog"
git commit -am "chore(changelog): prepare for next release"
echo "Changelog that will be used for this release:"
echo "---"
cat "$changelog"
echo "---"
cargo release --sign-tag --execute "$@"
tag=$(git tag --list --sort=-v:refname | head -n 1)
gh release create $tag -F "$changelog"
rm "$changelog"