myt/scripts/git.sh
Ari Archer 6d64048a74
Remove useless workflow
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
2022-04-05 14:01:47 +03:00

35 lines
832 B
Bash
Executable file

#!/usr/bin/env sh
[ "$DEBUG" ] && set -x
set -e
. "${SSPREFIX}scripts/source/logging.sh"
ask_y() {
printf "%s? [y/n] " "$1"
read -r yn
[ "$yn" != 'y' ] && exit
return 0
}
main() {
ask_y 'If you are about to release, did you update the __version__ variable in src/myt'
ask_y 'Did you update the dependencies in requirements.txt and/or requirements.dev.txt'
ask_y 'Did you update the README.md if needed'
ask_y 'Did you update the man page in doc/myt.1'
ask_y 'Did you update SECURITY.md'
log 'Running tests'
[ ! "$nt" ] && sh "${SSPREFIX}scripts/test.sh"
log 'Generating documentation'
[ ! "$nd" ] && sh "${SSPREFIX}scripts/doc.sh"
log 'Commiting changes and pushing'
git add -A
git commit -sa
git push -u origin "$(git branch --show-current)"
}
main "$@"