-
Notifications
You must be signed in to change notification settings - Fork 0
/
mkrelease
executable file
·42 lines (35 loc) · 908 Bytes
/
mkrelease
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
[ -f VERSION ] || {
echo "VERSION file missing. Exiting."
exit 1
}
. ./VERSION
usage() {
printf "\nUsage: mkrelease [-d] [-u]"
printf "\nWhere:"
printf "\n\t-d indicates create draft release"
printf "\n\t-u displays this usage message and exits\n"
exit 1
}
DRAFT=
while getopts "du" flag; do
case $flag in
d)
DRAFT="--draft"
;;
u)
usage
;;
esac
done
shift $(( OPTIND - 1 ))
ANNO="kitty-control version ${VERSION}r${RELEASE}"
gittag v${VERSION}r${RELEASE} ${ANNO}
echo "Creating release for version ${VERSION} release ${RELEASE}"
gh release create v${VERSION}r${RELEASE} ${DRAFT} \
--title "${ANNO}" \
--notes-file ReleaseNotes.md \
install \
bin/kitty-control \
CHANGELOG.md
git fetch --tags origin