Skip to content

Commit

Permalink
Add release creation script
Browse files Browse the repository at this point in the history
  • Loading branch information
doctorfree committed Oct 31, 2022
1 parent 63dd518 commit 7fd8300
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions scripts/mkrelease.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

VERSION="1.0.2"
RELEASE=1

usage() {
printf "\nUsage: mkrelease [-c] [-d] [-p] [-u]"
printf "\nWhere:"
printf "\n\t-c indicates clean first"
printf "\n\t-d indicates create draft release"
printf "\n\t-p indicates skip package creation step"
printf "\n\t-u displays this usage message and exits\n"
exit 1
}

CLEAN=
DRAFT=
PACKAGE=1
while getopts "cdpu" flag; do
case $flag in
c)
CLEAN=1
;;
d)
DRAFT="--draft"
;;
p)
PACKAGE=
;;
u)
usage
;;
esac
done
shift $(( OPTIND - 1 ))

ANNO="Obsidian Doctorfree Version ${VERSION} Release ${RELEASE}"

gh release create v${VERSION}r${RELEASE} ${DRAFT} \
--title "${ANNO}" \
--generate-notes

git fetch --tags origin

0 comments on commit 7fd8300

Please sign in to comment.