summaryrefslogtreecommitdiffstats
path: root/release.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-30 22:36:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-30 22:36:10 +0000
commit61d0a8bdffbbb7229776d2f4f2e79ed22d21551f (patch)
tree2e249969fedce45eb37ae6314ad167595900fe38 /release.sh
parentReleasing debian version 1.4-4. (diff)
downloadlibnvme-61d0a8bdffbbb7229776d2f4f2e79ed22d21551f.tar.xz
libnvme-61d0a8bdffbbb7229776d2f4f2e79ed22d21551f.zip
Merging upstream version 1.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'release.sh')
-rwxr-xr-xrelease.sh91
1 files changed, 0 insertions, 91 deletions
diff --git a/release.sh b/release.sh
deleted file mode 100755
index 320da46..0000000
--- a/release.sh
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/bash
-
-usage() {
- echo "Usage: release.sh [-d] VERSION"
- echo ""
- echo "The script does all necessary steps to create a new release."
- echo ""
- echo " -d: no documentation update"
- echo ""
- echo "Note: The version number needs to be exactly"
- echo " '^v[\d]+.[\d]+(.[\d\]+(-rc[0-9]+)?$'"
- echo ""
- echo "example:"
- echo " release.sh v2.1-rc0 # v2.1 release candidate 0"
- echo " release.sh v2.1 # v2.1 release"
-}
-
-build_doc=true
-
-while getopts "d" o; do
- case "${o}" in
- d)
- build_doc=false
- ;;
- *)
- usage
- ;;
- esac
-done
-shift $((OPTIND-1))
-
-VERSION=${1:-}
-
-if [ -z "$VERSION" ] ; then
- usage
- exit 1
-fi
-
-ver=""
-
-re='^v([0-9]+\.[0-9]+(\.[0-9]+)?)(-rc[0-9]+)?$'
-if [[ "$VERSION" =~ $re ]]; then
- echo "Valid version $VERSION string"
- # remove the leading 'v'
- ver=${VERSION#v}
-else
- echo "Invalid version string $VERSION"
- exit 1
-fi
-
-if [[ -n $(git status -s) ]]; then
- echo "tree is dirty. abort."
- exit 1
-fi
-
-if [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ] ; then
- echo "currently not on master branch. abort."
- exit 1
-fi
-
-# update all docs
-doc_dir=""
-if [ -d "Documentation" ]; then
- doc_dir="Documentation"
-elif [ -d "doc" ]; then
- doc_dir="doc"
-else
- echo "documenation directory not found"
- exit 1
-fi
-
-# update meson.build
-sed -i -e "0,/[ \t]version: /s/\([ \t]version: \).*/\1\'$ver\',/" meson.build
-git add meson.build
-git commit -s -m "build: Update version to $VERSION"
-
-if [ "$build_doc" = true ]; then
- # update documentation
- ./$doc_dir/update-docs.sh
- git add $doc_dir
- git commit -s -m "doc: Regenerate all docs for $VERSION"
-fi
-
-git tag -s -m "Release $VERSION" "$VERSION"
-git push --dry-run origin "$VERSION"^{}:master tag "$VERSION"
-
-read -p "All good? Ready to push changes to remote? [Yy]" -n 1 -r
-echo
-if [[ $REPLY =~ ^[Yy]$ ]]; then
- git push origin "$VERSION"^{}:master tag "$VERSION"
-fi