mirror of
https://github.com/nix-community/comma.git
synced 2024-09-11 03:55:24 +03:00
add release script from nixpkgs-lint
This commit is contained in:
parent
48b723b201
commit
1b07c19774
26
release.sh
Normal file
26
release.sh
Normal file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -p bash cargo yq -i bash
|
||||
# shellcheck shell=bash
|
||||
#
|
||||
|
||||
NEWVERSION="$1"
|
||||
|
||||
if [[ $NEWVERSION == "" ]]; then
|
||||
echo "No version specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Release version: $NEWVERSION"
|
||||
|
||||
OLDVERSION=$(tomlq -r ".package.version" Cargo.toml)
|
||||
|
||||
sed -i "s|$OLDVERSION|$NEWVERSION|" Cargo.toml
|
||||
|
||||
# update lockfile
|
||||
cargo build
|
||||
|
||||
# Commit and tag the update
|
||||
git add Cargo.toml Cargo.lock
|
||||
git commit -m "v${NEWVERSION}"
|
||||
git push origin $(git branch --show-current)
|
||||
gh release create v${NEWVERSION} -t v${NEWVERSION} --target $(git branch --show-current) --generate-notes
|
Loading…
Reference in New Issue
Block a user