kopia lustrzana https://github.com/weetmuts/wmbusmeters
Work on release process.
rodzic
0439a45e20
commit
26423949cd
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
# Copyright (C) 2022 Fredrik Öhrström (gpl-3.0-or-later)
|
||||
|
||||
# Grab all text up to the "Version x.y.z-RC1: <date>" line
|
||||
# Grab all text up to the "Version x.y.z-RC1 <date>" line
|
||||
# There should be no text.
|
||||
CHANGES=$(sed '/Version /q' CHANGES | grep -v ^Version | sed '/./,$!d' | \
|
||||
tac | sed -e '/./,$!d' | tac | sed -e '/./,$!d' > /tmp/release_changes)
|
||||
|
@ -13,7 +13,7 @@ then
|
|||
fi
|
||||
|
||||
# Grab all text between the Version RC and the previous VERSION.
|
||||
sed -n '/^Version.*-RC[0-9]:/,/^Version .*\.[0-9]\+:/{p;/^Version .*\.[0-9]\+:/q}' CHANGES \
|
||||
sed -n '/^Version.*-RC[0-9] /,/^Version .*\.[0-9]\+:/{p;/^Version .*\.[0-9]\+ /q}' CHANGES \
|
||||
| grep -v "^Version " | sed '/./,$!d' \
|
||||
| tac | sed -e '/./,$!d' | tac | sed -e '/./,$!d' > /tmp/release_changes
|
||||
|
||||
|
@ -32,7 +32,7 @@ PATCH=$(echo "$RC_VERSION" | cut -f 3 -d ' ')
|
|||
|
||||
NEW_VERSION="$MAJOR.$MINOR.$PATCH"
|
||||
|
||||
NEW_MESSAGE="Version $NEW_VERSION: $(date +'%Y-%m-%d')"
|
||||
NEW_MESSAGE="Version $NEW_VERSION $(date +'%Y-%m-%d')"
|
||||
|
||||
PREV_GIT_MESSAGE=$(git log -1 --pretty=%B)
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
# Grab all text up to the "Version x.y.z: <date>" line
|
||||
# Grab all text up to the "Version x.y.z <date>" line
|
||||
# If there is no text, then we have to add some information to CHANGES
|
||||
# before we make a release.
|
||||
CHANGES=$(sed '/Version /q' CHANGES | grep -v ^Version | sed '/./,$!d' | \
|
||||
|
@ -21,11 +21,7 @@ then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
cat /tmp/release_changes
|
||||
|
||||
exit 0
|
||||
|
||||
VERSION=$(grep -m 1 ^Version CHANGES | sed 's/Version \([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\(-RC[ 0-9]\?\)\?:.*/\1 \2 \3 \4/')
|
||||
VERSION=$(grep -m 1 ^Version CHANGES | sed 's/Version \([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\(-RC[ 0-9]\?\)\? .*/\1 \2 \3 \4/')
|
||||
|
||||
MAJOR=$(echo "$VERSION" | cut -f 1 -d ' ')
|
||||
MINOR=$(echo "$VERSION" | cut -f 2 -d ' ')
|
||||
|
@ -57,7 +53,7 @@ fi
|
|||
|
||||
RC_VERSION="$MAJOR.$MINOR.$PATCH-RC$RC"
|
||||
|
||||
MESSAGE="Version $RC_VERSION: $(date +'%Y-%m-%d')"
|
||||
MESSAGE="Version $RC_VERSION $(date +'%Y-%m-%d')"
|
||||
|
||||
echo
|
||||
echo "$MESSAGE"
|
||||
|
|
Ładowanie…
Reference in New Issue